soundmud / soundrts

A real-time strategy audio game
http://jlpo.free.fr/soundrts
Other
44 stars 32 forks source link

Different damage amounts to different unit types #37

Open craigbrett17 opened 10 years ago

craigbrett17 commented 10 years ago

Kind of related to issue #36. I'm trying to influence how much damage a particular unit's attack does to different enemy types.

So far, I've been using armour and cooldown to do this and it has worked mostly well. Units that specialize in killing infantry fire really fast and do little damage, so that they don't really penetrate tank armour too much. Similarly, tank destroying weapons fire slow and do a lot of damage, to punch through the armour.

The problem comes in more with the second scenario really. It means that slow firing anti-tank weapons are actually quite effective against infantry, since they do lots of damage, even though the rate of fire isn't all that high.

I now also want to make anti-tank weaponry that really does specialize against tanks, and does less damage to infantry and structures. Since tanks are the things with the high armour, I can't use the normal high damage low rate of fire thing here.

What I'd like is either a modifier or a different damage amount altogether for different types. So some kind of a list of types and the modifier applied. For example.

def tank_destroyer class soldier ... damage 80 damage_modifiers infantry 0.1 structure 0.1 ; some kind of dictionary I guess

Whether this is done through inheritence or some kind of custom class could match up with issue #36's solution.

soundmud commented 10 years ago

"damage_modifiers" sounds good. 0.1 would mean 10% (-90%) 1.5 would mean 150% (+50%) 2.0 would mean 200% (+100%)

Maybe implementing this would be a good start, or maybe already thinking about complicating it with different attacks depending on the target's type (including aerial or ground units) would be better.

Maybe the "units with different attacks" issue would combine naturally later:

damage_modifiers infantry 0.1 structure 0.1
damage_modifiers_attack2 infantry  1 structure 1

Maybe the simple version would be easily done for 1.2 alpha 10.

sanslash332 commented 10 years ago

This is very interesting, and work like a bonus or malus of starcraft 2.

For have a diferent categories of units, you just create a diferent abstract class to define some kind of units: for example:

def biological: class soldier ; maive this cand change to... ham... abstract, or unitClass, for you can aply this types to workers too. ;Spesific properties of biological (can be healed, corpse, etc)

def psionic; or magical: ... etc

and in the units:

def energy_absorveer ;bla bla damage_modifier 1.3 magical 0.01 mechanical

etc.

IF you implement this, is more easy valance the question of armor. Of course, this bonus, doesn’t consider the armors.

From: soundmud Sent: Sunday, September 07, 2014 10:01 AM To: soundmud/soundrts Subject: Re: [soundrts] Different damage amounts to different unit types (#37)

"damage_modifiers" sounds good. 0.1 would mean 10% (-90%) 1.5 would mean 150% (+50%) 2.0 would mean 200% (+100%)

Maybe implementing this would be a good start, or maybe already thinking about complicating it with different attacks depending on the target's type (including aerial or ground units) would be better.

Maybe the "units with different attacks" issue would combine naturally later:

damage_modifiers infantry 0.1 structure 0.1 damage_modifiers_attack2 infantry 1 structure 1 Maybe the simple version would be easily done for 1.2 alpha 10.

— Reply to this email directly or view it on GitHub.

craigbrett17 commented 10 years ago

Yeah, those are the sorts of values I was thinking, 0.1 being 10%, 2.0 being 200%, etc.

I think this will certainly make things more flexible.