Broken Promise
The sketch didn't really clear anything up, so I just took a potshot at calculating base-power for simple attacks. Behold!
The above will be in its own function, so that special attacks can also use it. I may be able to trudge ahead, with an ultimate generic command that doesn't even affect gameplay, to get the battle-system realized; and that may be most prudent, considering the admittedly unexpected complexity of damage-calculation within Pokémon. Yes, I will address the use of ‘self’, too.
The sketch didn't really clear anything up, so I just took a potshot at calculating base-power for simple attacks. Behold!
Code:
apply = self.power
if Moves.Helping_Hand in caster.active_monster.conditions:
apply *= 1.5
apply = caster.active_monster.item.attack(caster, apply)
if self.type is Types.ELECTRIC:
if Moves.Charge in caster.active_monster.conditions:
apply *= 2
if Moves.Mud_Sport in stage.conditions:
apply *= 0.5
elif self.type is Types.FIRE:
if Moves.Water_Sport in stage.conditions:
apply *= 0.5
apply = caster.active_monster.ability.attack(caster, apply)
apply = target.active_monster.ability.attack(target, None, apply)









