public BattleHitTarget(Pokemon pokemon) { this.pokemon = pokemon; preHPPercent = pokemon.HPPercent; postHPPercent = pokemon.HPPercent; preHP = 0; postHP = 0; subDamage = -1; damageDealt = -1; disguise = null; effectiveness = new BattleTypeEffectiveness(); affectedByMove = true; missed = false; criticalHit = false; fainted = false; isMoveReflected = false; destinyBondMove = null; protection = null; teamProtection = null; protectAbility = null; protectItem = null; reflection = null; reflectMove = null; reflectAbility = null; reflectItem = null; endure = null; sturdyPair = null; focusBand = null; surviveAbility = null; surviveItem = null; }
public void CloneFrom(BattleHitTarget other) { preHPPercent = other.preHPPercent; postHPPercent = other.postHPPercent; preHP = other.preHP; postHP = other.postHP; subDamage = other.subDamage; damageDealt = other.damageDealt; disguise = (other.disguise == null) ? null : other.disguise.Clone(); effectiveness = other.effectiveness.Clone(); affectedByMove = other.affectedByMove; missed = other.missed; criticalHit = other.criticalHit; fainted = other.fainted; isMoveReflected = other.isMoveReflected; destinyBondMove = other.destinyBondMove; protection = (other.protection == null) ? null : other.protection.Clone(); teamProtection = (other.teamProtection == null) ? null : other.teamProtection.Clone(); protectAbility = other.protectAbility; protectItem = other.protectItem; reflection = (other.reflection == null) ? null : other.reflection.Clone(); reflectMove = other.reflectMove; reflectAbility = other.reflectAbility; reflectItem = other.reflectItem; endure = (other.endure == null) ? null : other.endure.Clone(); sturdyPair = (other.sturdyPair == null) ? null : other.sturdyPair.Clone(); focusBand = (other.focusBand == null) ? null : other.focusBand.Clone(); surviveAbility = other.surviveAbility; surviveItem = other.surviveItem; }