Ejemplo n.º 1
0
    public void OverrideBaseDamage(ModifiedBaseDamage newBaseDamage)
    {
        if (modifiedBaseDamage != null)
        {
            throw new System.Exception("You already modified base damage! You're trying to do it twice. This doesn't work");
        }

        modifiedBaseDamage = newBaseDamage;
    }
Ejemplo n.º 2
0
    public void PrepareActivation(List <Character> targets, TargetedAnimation animation, Action preparedCallback)
    {
        var bd = new ModifiedBaseDamage();

        bd.minDamage = minDamage;
        bd.maxDamage = maxDamage;
        controller.character.attackModule.OverrideBaseDamage(bd);
        preparedCallback();
    }
Ejemplo n.º 3
0
    public AttackData CreateCounterAttack(AttackData incomingAttack)
    {
        var attackModule = incomingAttack.target.attackModule;

        var bd = new ModifiedBaseDamage();

        bd.minDamage = minDamage;
        bd.maxDamage = maxDamage;
        attackModule.OverrideBaseDamage(bd);
        attackModule.activeLabels = labels;
        var attack = attackModule.CreateAttack(incomingAttack.target, incomingAttack.attacker);

        attackModule.RemoveBaseDamageOverride();

        return(attack);
    }
Ejemplo n.º 4
0
 public void RemoveBaseDamageOverride()
 {
     modifiedBaseDamage = null;
 }