• 🏆 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!

Judegment Spell

Status
Not open for further replies.
Level 10
Joined
Apr 22, 2010
Messages
421
So I wanna make a spell, here's how it works

Judgement - 200/250/300*mp
The Paladin targets a unit for judgement by the gods, giving a chance of damaging or healing the target unit by 500/1000/1500 health. Cannot target self.
Level 1- 50% chance of heal or damage
Level 2- 65% chance for heal if allied, damage if enemy
Level 3- 80% chance for heal if allied, damage if enemy*

How do I do this?
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
event unit is starting an effect of an ability

condition your ability

actions

if random integer number between 0 and 100 less than or equal to 35 + 15 * lvl of ability being cast then
if target unit is an ally == true then
set life of target = target life + 500 * lvl of ability being cast
else
call unittargetdamage 500*lvl
endif
 
Level 10
Joined
Apr 22, 2010
Messages
421
@Defskull, you kinda got the idea, but what i want is that there is a 50% to heal or damage at level one, but at level 2, there is 65% chance to damage enemies or heal allies. At each each level, the percent is only determining how likely it is to heal an ally or damage an enemy, if dice roll is a failure, the ally would be damage instead, and the enemy would be healed instead.
 
Level 7
Joined
May 18, 2010
Messages
264
u chould say that sooner =,= il tipos out gime minute

Edit: Here it is
  • Judgment
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Animate Dead
    • Actions
      • Set JudgmentCaster = (Triggering unit)
      • Set JudgmentTarget = (Target unit of ability being cast)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and 100) Less than or equal to (<=) (35 + ((Level of Animate Dead for JudgmentCaster) x 15))
          • Then - Actions
            • Unit - Set life of JudgmentTarget to ((Life of JudgmentTarget) + (500.00 x (Real((Level of Animate Dead for JudgmentCaster)))))
          • Else - Actions
            • Unit - Cause JudgmentCaster to damage JudgmentTarget, dealing (500.00 x (Real((Level of Animate Dead for JudgmentCaster)))) damage of attack type Spells and damage type Normal
            • Unit - Set life of JudgmentTarget to ((Life of JudgmentTarget) - (500.00 x (Real((Level of Animate Dead for JudgmentCaster)))))
In Else pick whyc one u want
1st one if u want ur spell to be able to kill target
2nd if u want it to remove the hp but keap target alive
animate dead swap with judgment
and i think thats it

EDIT: be informed i read about some bug that (Set life of Target(it has 150hp) to Life of Target - 500) it wont remove the hp ... just read ... try out if it happens be shure to write back
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
@Defskull, you kinda got the idea, but what i want is that there is a 50% to heal or damage at level one, but at level 2, there is 65% chance to damage enemies or heal allies. At each each level, the percent is only determining how likely it is to heal an ally or damage an enemy, if dice roll is a failure, the ally would be damage instead, and the enemy would be healed instead.

Level 2- 65% chance for heal if allied, damage if enemy
Wha---

You should explained it, like this...
Level 1 - 50% chance to heal targeted unit | 50% chance to damage targeted unit
Level 2 - 65% chance to heal targeted unit (ally) | 35% chance to damage targeted unit (ally)
Level 3 - 80% chance to heal targeted unit (ally) | 15% chance to damage targeted unit (ally)

But you said:
Level 1- 50% chance of heal or damage
Level 2- 65% chance for heal if allied, damage if enemy
Level 3- 80% chance for heal if allied, damage if enemy*
See what I meant ?
You said that 65% chance for heal IF allied, damage if enemy

What I understand is... (assume this spell at level 3)

1. You want a 80% chance to heal ally OR 80% chance to damage enemy ?
2. If heal-ally fail, then damage the ally OR if damage-enemy fail, heal the enemy ?
3. So, there is 20% chance to damage the ally and 20% chance to heal the enemy unit, is it ? The rest is, 80% (with reverse-effect like damage to heal | heal to damage) ?
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
@defskull, sry for not being clear, at level 3 its like this:
When You Cast on Ally Hero: 80% Chance To Heal them for 1500 hp
20% Chance to damage them for 1500 hp
When u cast on Enemy Hero: 80% Chance To damage them for 1500 hp
20% Chance to heal them for 1500 hp

Seems that I got it totally wrong as well.

Just make the heal in the else state when you check the chance.
 
Level 10
Joined
Apr 22, 2010
Messages
421
yes, i did that by using a check condition to see if the hero is an ally, a dice roll variable to roll the chances and a other checker to see if the rolled number is within the percentage. Then, the target would be damaged or healed. The problem is that it dosent do anything, i need someone to make the whole triggered spell since thats where im having the difficulty
 
Level 16
Joined
May 1, 2008
Messages
1,605
Well there must be more ya did, cuz look the variable in the cast.

You have:
  • Set AbilityLevel = (Real((Level of Select Hero for (Triggering unit))))
In tha original map it's:
  • Set AbilityLevel = (Real((Level of Judgement for (Triggering unit))))
Pos. this the error cuz ability "Select Hero" is 0 so zero dmg and heal ...
 
Status
Not open for further replies.
Top