Clean-up permanent monster spawn: (#1831)

* Clean-up permanent monster spawn:
- <delay1>,<delay2>,<event> are actually optionnal field
- <event> value 0 and 1 are meaningless (actually event name with length < 4 are skipped)

* Exported monster AI constants

* Updated docs for monster size constants (already exported)
Notes:
- the default size for monster script cmd was small not medium
- monster script cmd now display a warning for size above SZ_BIG (previously SZ_ALL)

* - Fixed an issue to make <xs> and <ys> optionnals
- Updated npcs scripts

* Leftover in the docs for permanent monster spawn

* Corrected english docs. Credit to @aleos89
Added additionnal warning for xs / ys negative input. Credit @Lemongrass3110 

Thanks to @cydh for the idea
This commit is contained in:
Atemo
2017-01-22 19:03:08 +01:00
committed by GitHub
parent 047ef1263b
commit c6470ff4ff
175 changed files with 9885 additions and 9850 deletions

View File

@@ -9890,7 +9890,7 @@ BUILDIN_FUNC(monster)
if (script_hasdata(st, 9)) {
size = script_getnum(st, 9);
if (size > 3) {
if (size > SZ_BIG) {
ShowWarning("buildin_monster: Attempted to spawn non-existing size %d for monster class %d\n", size, class_);
return SCRIPT_CMD_FAILURE;
}