Пример #1
0
    public Taunt(string name, string description, int cost, UniqueEffect effectFunction)
    {
        //Sets up fields
        this.name        = name;
        this.description = description;
        this.cost        = cost;

        //Sets effect function
        boostAttack    = null;
        uniqueFunction = effectFunction;
    }
Пример #2
0
    public void Resolve(EntityBehaviour sender, EntityBehaviour reciever = null, Vector2 target = new Vector2())
    {
        UniqueEffect effect = _effects[_currentTurn++];

        if (effect != null && (reciever == null || reciever != null && reciever.isAlive))
        {
            string value = effect.ResolveUniqueEffect(sender, reciever, target);
            if (_type == EffectType.Physical || _type == EffectType.Magic || _type == EffectType.Heal || _type == EffectType.Charac)
            {
                string effectType = effect.charac.ToString();
                if (effect.charac.ToString().StartsWith("current"))
                {
                    effectType = effect.charac.ToString().Substring(7);
                }

                ChatBehaviour.WriteMessage(
                    reciever.character.nickname + " : " + value + " " + effectType + " by " + _name + " from " + sender.character.nickname + ".",
                    MessageType.Combat
                    );
            }
        }
    }