If checks on fight progs
If checks on fight progs
I had a question about fight progs. Now, in all of the examples, the mobs have "if quest" checks put on them. I was wondering if the if checks are actually required or if they can be left oout of the prog. Any help would be gratly appreciated.
From your friendly neighborhood ranger
-
- Sword Grand Master
- Posts: 4708
- Joined: Tue Jul 15, 2003 9:26 pm
- Location: House of Wonder, Waterdeep
No, you can have fight progs with no if-checks. For example :
This is actually a disguised if-checks, since it does the same as
Most fight-progs have if-checks though, because if-checks combined with rand(...) allow us to make the mob's behaviour "random": the mob "chooses" an action amongst several possibilities.
Code: Select all
>fight_prog 40~
mpecho $I spits murky waters into $N's eyes!
mpcast blindness $n
~
This is actually a disguised if-checks, since it does the same as
Code: Select all
>fight_prog 100~
if rand(40)
mpecho $I spits murky waters into $N's eyes!
mpcast blindness $n
endif
~