예제 #1
0
    bool Advantage(BattleConditions battle, GameObject owner)
    {
        if (owner.GetInstanceID() == battle.GetAttacker().GetInstanceID())
        {
            if (battle.GetDefenderWeapon().weaponClass == advantage)
            {
                return(true);
            }
        }
        else if (owner.GetInstanceID() == battle.GetDefender().GetInstanceID())
        {
            if (battle.GetAttackerWeapon().weaponClass == advantage)
            {
                return(true);
            }
        }

        return(false);
    }
예제 #2
0
    //Armor Slayer: Increased damage against heavy armor
    public override int GetBonusDamage(BattleConditions battle, GameObject owner)
    {
        if (battle.GetDefenderArmor() == null)
        {
            return(0);
        }
        if (owner.GetInstanceID() == battle.GetAttacker().GetInstanceID())
        {
            if (battle.GetDefenderArmor().weightClass == effective)
            {
                return(armorSlayerDamageBonus);
            }
        }
        else if (owner.GetInstanceID() == battle.GetDefender().GetInstanceID())
        {
            if (battle.GetAttackerArmor().weightClass == effective)
            {
                return(armorSlayerDamageBonus);
            }
        }

        return(0);
    }