siggame / MegaMinerAI-13

MegaMinerAI-13: Droids
1 stars 5 forks source link

Armor, how should it work? #37

Open Tarnasa opened 10 years ago

Tarnasa commented 10 years ago

Currently:

damage = attacker.attack
if target.armor > 0:
    damage = int(attacker.attack * ((target.maxArmor - target.armor) / float(target.maxArmor)))
    target.armor -= attacker.attack
    if target.armor < 0:
        target.armor = 0
target.healthLeft -= damage

This mechanic favors multiple small attacks over a single large one, and is IMHO too complicated.

I think we should do away with armor and replace it with a maxRepair variable which determines how much a droid can be repaired. And have healthLeft be the only indicator of a droids aliveness.