/// <summary> /// increases a damage amount by some value based on the Effects on this actor /// this should be called whenever the damage of an attack is assigned (Projectile created /// area damage removed from player control), some modifiers can be changed /// while the player has an item equipped /// </summary> /// <param name="amount">the base amount of damage to be dealt</param> /// <param name="damageType">the type of damage being dealt</param> /// <param name="fromCard">false if damage is not set when card is used /// this prevents large spikes in damage from equipment</param> /// <returns></returns> public float modifyDamage(float amount, DamageTypes damageType, bool fromCard) { DamageIncreaseData damageIncreaseData = new DamageIncreaseData(amount, damageType, fromCard); damageIncreaseData = updateDamageIncreseData(damageIncreaseData); return(damageIncreaseData.getModifyedDamageAmount()); }
public void updateAreasDamageAmounts(Actor damageAreaUser, bool directFromCard) { DamageIncreaseData data = damageAreaUser.effects.getDamageIcreaseAmounts(damageAmountForModifications, damageType, directFromCard); for (int i = 0; i < damageAreas.Length; i++) { data.amount = damageAreas[i].damageAmount; damageAreas[i].damageAmount = data.getModifyedDamageAmount(); damageAreas[i].damageType = damageType; damageAreas[i].damageSorce = damageAreaUser.Team; } damageSorce = damageAreaUser; }