예제 #1
0
    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);
    }
예제 #2
0
    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
        });
    }
예제 #3
0
    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
        });
    }
예제 #4
0
    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
        });
    }