Cost HP for spell?
Moderator: Cheaters
-
- Senior Member
- Posts: 174
- Joined: June 24th, 2007, 7:44 am
- Title: Pleb
- Location: NSW
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: Cost HP for spell?
Lol sorry bout that..this one should work...I tested it and messed with the value, and it decreased different amounts each time, but steady with the same max mana..which should be whats happening..Just a slight edit..had the wrong one the first time try which explains the wait lol.
Code: Select all
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - ((Max mana of (Casting unit)) x 0.07))

-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: Cost HP for spell?
...Syre wrote:Lol sorry bout that..this one should work...I tested it and messed with the value, and it decreased different amounts each time, but steady with the same max mana..which should be whats happening..Just a slight edit..had the wrong one the first time try which explains the wait lol.Code: Select all
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - ((Max mana of (Casting unit)) x 0.07))
so if a unit has 100 mana.
wont it make the casting unit ALLWAYS have 93mana?
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: Cost HP for spell?
No. Thats the mistake i made when i first tried that. If it said That would set the mana to 93/100 each time. However, since i used just mana it takes the Current mana of the caster , and than minuses max mana x .07 . So pretty much..if a unit has 100 max mana and has 90 currently, when using the spell he'd have 83 after. So the equation is 90(current)-(100(max)*.07(percent lost))=83(result)
Code: Select all
Unit - Set mana of (Casting unit) to ((Max Mana of (Casting unit)) - ((Max mana of (Casting unit)) x 0.07))
Code: Select all
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - ((Max mana of (Casting unit)) x 0.07))
Code: Select all
((Mana of (Casting unit))
Code: Select all
((Max mana of (Casting unit)) x 0.07))

-
- Senior Member
- Posts: 174
- Joined: June 24th, 2007, 7:44 am
- Title: Pleb
- Location: NSW
Re: Cost HP for spell?
=D
Much thanks
EDIT: i think i made a mistake anyone find it?
Much thanks
EDIT: i think i made a mistake anyone find it?
Code: Select all
Unit - A unit Begins casting an ability
(Ability being cast) Equal to Emanation of Life
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - ((Max mana of (Casting unit)) x 0.07))%
Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - ((Max life of (Casting unit)) x 0.07))%
Spoiler: