public override void ApplyToActor(CombatActor aTargetActor) { int defense = aTargetActor.GetAttributeValue(AttributeType.Defense); int finalDamages = (int)Mathf.Ceil(myDamageAmount - defense / 2); // TODO: damage type aTargetActor.TakeDamage(mySourceActor, finalDamages, myDamageType); }
public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition) { int attack = aSourceCombatActor.GetAttributeValue(AttributeType.Attack); DamageCombatEffect damageEffect = new DamageCombatEffect(attack, DamageType.PHYSICAL); damageEffect.myAffectedCells = GetAffectedCellsPattern(); return(new List <CombatEffect>() { damageEffect }); }
public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition) { int magic = aSourceCombatActor.GetAttributeValue(AttributeType.MagicPower); float magicModifier = 1.0f + magic / 10.0f; int damages = (int)Mathf.Floor(10 * magicModifier); DamageCombatEffect damageEffect = new DamageCombatEffect(damages, DamageType.AIR); PushActorCombatEffect pushEffect = new PushActorCombatEffect(new Vector2Int(2, 0)); return(new List <CombatEffect>() { damageEffect, pushEffect }); }
public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition) { int magic = aSourceCombatActor.GetAttributeValue(AttributeType.MagicPower); float magicModifier = 1.0f + magic / 10.0f; int damages = (int)Mathf.Floor(10 * magicModifier); DamageCombatEffect damageCombatEffect = new DamageCombatEffect(damages, DamageType.FIRE); BuffCombatEffect burningEffect = new BuffCombatEffect(); // TODO: burning as buff return(new List <CombatEffect>() { damageCombatEffect, burningEffect }); }