Ejemplo n.º 1
0
    private void Effect(Unit allyKilled)
    {
        if (allyKilled == this)
        {
            return;
        }
        Unit mostExpensiveAlly = owner.MostExpensiveAlly(new List <Unit> {
            this
        });

        if (mostExpensiveAlly == null)
        {
            return;
        }
        mostExpensiveAlly.Cost = mostExpensiveAlly.Cost - 1;

        // Animation
        SupportAnimation supportAnimation = (SupportAnimation)GetAnimation <SupportAnimation>()?.Copy();

        supportAnimation?.Init(this, mostExpensiveAlly);
        supportAnimation?.Register();

        CostChangeAnimation costChangeAnimation = (CostChangeAnimation)GetAnimation <CostChangeAnimation>()?.Copy();

        costChangeAnimation?.Init(mostExpensiveAlly);
        costChangeAnimation?.Register();
    }
Ejemplo n.º 2
0
    private void DeathEffect(Unit killer, Field field)
    {
        List <Unit> adjacentEnemies = GetAdjacentEnemies(field);

        List <CustomAnimation> animations = new List <CustomAnimation>();

        foreach (Unit unit in adjacentEnemies)
        {
            unit.KeywordManager.GrantKeyword <Poisoned>();

            // Animation
            SupportAnimation supportAnimation = (SupportAnimation)GetAnimation <SupportAnimation>()?.Copy();
            supportAnimation?.Init(this, unit);
            supportAnimation?.Register(parallel: true);
        }
    }
Ejemplo n.º 3
0
    public void Support(Move move)
    {
        Unit other = move.GetEnd().unit;

        other.hasHaste = true;
        other.KeywordManager.RevokeKeyword <Poisoned>();

        // Animation
        SupportAnimation supportAnimation = (SupportAnimation)GetAnimation <SupportAnimation>().Copy();

        supportAnimation?.Init(this, other);
        supportAnimation?.Register();

        BuffAnimation buffAnimation = (BuffAnimation)GetAnimation <BuffAnimation>().Copy();

        buffAnimation?.Init(other);
        buffAnimation?.Register();
    }