C
Crirus
Hello again
I have this issue.
I need to design a game weapon. I made a base class Weapon
Each weapon have:
- range(max 1-16),
- ToHit array of values that gives percent that should be returned by a
random in order to apply damage to enemy
-Power ... the damage to apply to a hitted target
Now, I need some derived classes from this with specific values
Ex: LightGun:
Range={1,2,3,4,5,6}
ToHit={90,80,70,60,50,40} 'percents needed in order to hit target
Power={10,9,8,7,6,5}
Range can be only the bound of ToHit array, no need to specify it as values
Any gun is applyed to a unit.
I need some ideeas how to implement this
Thanks
I have this issue.
I need to design a game weapon. I made a base class Weapon
Each weapon have:
- range(max 1-16),
- ToHit array of values that gives percent that should be returned by a
random in order to apply damage to enemy
-Power ... the damage to apply to a hitted target
Now, I need some derived classes from this with specific values
Ex: LightGun:
Range={1,2,3,4,5,6}
ToHit={90,80,70,60,50,40} 'percents needed in order to hit target
Power={10,9,8,7,6,5}
Range can be only the bound of ToHit array, no need to specify it as values
Any gun is applyed to a unit.
I need some ideeas how to implement this
Thanks