• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AOE stat increment chance

Status
Not open for further replies.
Level 2
Joined
Dec 10, 2006
Messages
7
OK... I need some really tough help here...

I've been experimenting with this spell over the last 2 hours but I just can't seem to fix it....

Problem: This is a spell based off FlameStrike. It is called Soul Steal, has a casting range of 600 and has 4 levels. This skill has a chance of adding 0.5x(Level of SS) to all 3 attributes, depending on the number of enemies that get hit by this spell... Each enemy targetted grants an additional 2% chance to get the permanent stat increase.

Here's the trigger:

Skill_Level = Skill level of Soul Steal
Enemy_Count = No. of enemies hit by the Soul Steal(FlameStrike) with a range of 600 from the casting point
Percent_Counter = Meant to be a counter set at 100%. It's set at 50, but as you can see, each enemy increases Enemy_Counter by 1, so its 1/50 chance per enemy for increasing stats.

SoulSteal Initialization
Events
Unit - A unit Begins casting an ability
Conditions

(Ability being cast) Equal to Soul Steal (Sin)
(Unit-type of (Casting unit)) Equal to <Hero> (Player Hero)
Actions
Set Skill_Level = (Level of (Ability being cast) for (Triggering unit))
Unit Group - Pick every unit in (Units within 600.00 of (Target point of ability being cast)) and do (Actions)
Loop - Actions
If ((Owner of (Picked unit)) Equal to Player 12 (Brown)) then do (Set EnemyCount = (EnemyCount + 1)) else do (Do nothing)
Set Percent_Counter = 50
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EnemyCount Less than or equal to Percent_Counter
EnemyCount Greater than 0
Then - Actions
Hero - Modify Strength of (Triggering unit): Add (Skill_Level x (1 / 2))
Hero - Modify Agility of (Triggering unit): Add (Skill_Level x (1 / 2))
Hero - Modify Intelligence of (Triggering unit): Add (Skill_Level x (1 / 2))
Else - Actions
Do nothing
Wait 0.50 game-time seconds
Set EnemyCount = 0

I really need help on this one... Anyone who knows(or is good at AOE-spells like FlameStrike) pls HELP!

Thanks... =)
 
Level 11
Joined
Jul 12, 2005
Messages
764
Unit Group - Pick every unit in (Units within 600.00 of (Target point of ability being cast)) and do (Actions)
Loop - Actions
If ((Owner of (Picked unit)) Equal to Player 12 (Brown)) then do (Set EnemyCount = (EnemyCount + 1)) else do (Do nothing)

This is OK, it counts the enemies...
But your "+2% chance system" is messed up. Your problems begin with "how to make a chance-system"...
Try this:

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(EnemyCount * 2) Greater than or equal to (Random integer number between 1 and 100)
Then - Actions
Hero - Modify Strength of (Triggering unit): Add (Skill_Level x (1 / 2))
Hero - Modify Agility of (Triggering unit): Add (Skill_Level x (1 / 2))
Hero - Modify Intelligence of (Triggering unit): Add (Skill_Level x (1 / 2))
Else - Actions


Everytime you want an ability with chance, use this structure in the trigger:

<chance> Greater than or equal to (Random integer number between 1 and 100)

;)

And btw, you cannot add half attribute points. What if the level is 1 or 3? That's why you cannot type 0.5 into the vaue field. It needs an integer (number without decimals).
You have to change it...
 
Status
Not open for further replies.
Top