• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Boss fight mechanics

Level 8
Joined
Jun 13, 2010
Messages
344
Hi,

I want to make a rather simple and reusable trigger for boss abilities.

I want the boss to cast a random spell from his tool kit every now and then.

I tried making it like 20% proc chance to cast a random ability when he is attacking. However if his attack speed is slowed, he gets stunned or kited, he won't cast any spells.

I thought about making it 20% proc chance for every 2 periodic seconds. But some abilities may take longer than 2 seconds for him the finish casting.

Any ideas of a simple spell cast system?

Also I experienced a bug where issuing a boss to cast abilities that cost mana forced the boss to pause indefinitely. I don't know if you have any explanations for this. The bos had plenty mana.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,567
Hi,

I want to make a rather simple and reusable trigger for boss abilities.
Here's a system I threw together. It requires the latest patch to open (hopefully you're on it).

To test the map, simply order your Mountain King to attack towards the Peasants. You'll notice it has automatic casting behavior based on the variables configured in the BCA Setup trigger.

In my example I set it up to do the following:
  • Storm Bolt requires 1 enemy unit within Cast Range.
  • Thunder Clap requires 3 enemy units within Area of Effect radius. It uses an optional Leniency system that will temporarily reduce the number of targets needed if it keeps failing to cast. This is useful if say you were playing solo and only had 1 Hero up against a Boss.
  • Avatar requires 0 targets and will simply cast as soon as possible.
It may seem complicated but you only need to configure the BCA Setup trigger where it says to:
  • -------- [ CONFIGURE ] --------
Follow the pattern of how I configured the Mountain King and apply that logic to your own units.

Then look at my two Demo triggers to see how to actually use the system once configured. You would simply Register your Boss when it comes time to fight him and when the Boss dies you would Unregister him. You can Register as many units as you want.

Note that it may have bugs, my tests are only with those 3 abilities. It's also missing logic for things like casting a Serpent Ward at a strategic distance from the enemies, it'll instead cast it on top of a target (if it even casts at all). You could add more logic to the BCA Execute AI trigger to account for this sort of behavior.

Edit: Updated with slight improvements to efficiency, naming conventions, and customization.
 

Attachments

  • Basic Caster AI 2.w3m
    32.9 KB · Views: 2
Last edited:
Top