As of #224, a new ranger program has been added. Keeping the same basic functionality, but encapsulating most of the functionality within to ensure logical flow of its many options (based on keywords and mob flags). The old program was susceptible to things like double movements/actions and the HUNTER flag was more like teleporting rooms in a single action and skipping middle rooms, which prevented things like on_enter from these rooms. I also added a char variable (ch->spec_busy), that allows programs to set and unset a busy state on a mob, so that successive activity calls can be prevented if a program is still operating. This was currently put in place to prevent extra movements, while busy, in do_move() that would call for the special program again. As of #254, it will respect the imm flag NO_HASSLE.
The one thing altered for this prog only, is a new method to see_hidden() in spec_pro, which has comments there on how to undo if we decide we want to keep the standard way. Because of the volatility of this mob with ambush and hide at higher levels, I felt high rangers should have at least a very low chance of being able to hide from it for maybe 1 round, regardless of the mob's level and the standard boost it gets to hide from that.
The new program has keyword options "stab", "hunt", "riposter". "Stab" will have the mob choose to ambush instead of regular attack. "Hunt" will have the mob hunt tracks for targets that its aggressive to, even if the mob is flagged SENTINEL as of (#254). Also, "hunt" will not follow tracks if they lead into a NO_MOB room. Riposte of skill level 75 is an added option as of #264.
This program supports mob flags:
As of #224, a new ranger program has been added. Keeping the same basic functionality, but encapsulating most of the functionality within to ensure logical flow of its many options (based on keywords and mob flags). The old program was susceptible to things like double movements/actions and the HUNTER flag was more like teleporting rooms in a single action and skipping middle rooms, which prevented things like on_enter from these rooms. I also added a char variable (ch->spec_busy), that allows programs to set and unset a busy state on a mob, so that successive activity calls can be prevented if a program is still operating. This was currently put in place to prevent extra movements, while busy, in do_move() that would call for the special program again. As of #254, it will respect the imm flag NO_HASSLE.
The one thing altered for this prog only, is a new method to see_hidden() in spec_pro, which has comments there on how to undo if we decide we want to keep the standard way. Because of the volatility of this mob with ambush and hide at higher levels, I felt high rangers should have at least a very low chance of being able to hide from it for maybe 1 round, regardless of the mob's level and the standard boost it gets to hide from that.
The new program has keyword options "stab", "hunt", "riposter". "Stab" will have the mob choose to ambush instead of regular attack. "Hunt" will have the mob hunt tracks for targets that its aggressive to, even if the mob is flagged SENTINEL as of (#254). Also, "hunt" will not follow tracks if they lead into a NO_MOB room. Riposte of skill level 75 is an added option as of #264.
This program supports mob flags: