Lobster
Old Fogey ofthe site
- Reaction score
- 90
Is there such thing as
I need it for my resistant thing, if thjats even possible.
Code:
Take integer Return Unit
Take integer Return Unit
function Resistance takes integer I returns unit
//do my fancy code here
return myUnit
endfunction
all the spells have a element type, And every unit has a certain amount of resistance, and a certain amount of power for each element. for example: Oceans wave is a spell that deals water damage. If a unit in the way of the spell has a water resistance to 20 to water and the spell would have done 40 damage, the spell would do a total of 20 damage, because 40-20= 20. If the unit has -20 resistance to water* the unit will take 60 damage, because 40+20 = 60.
* The real resistance is on a balance between 0- 1000, where 500 is the balance between negative and positive.
Sorry if I can't be clear, this is taking math which might be hard for some people to understand.