示例#1
0
 protected virtual void OnSkipTurn(Player i_Player)
 {
     if (SkipTurn != null)
     {
         SkipTurn.Invoke(i_Player);
     }
 }
示例#2
0
    // On effect added th the actor
    public void RunAction(Actor source, Actor target, Card card, BattleContext manager)
    {
        //search buffs
        bool         isBuffFound = false;
        List <IBuff> buffList    = target.BuffList.GetAll();

        foreach (IBuff buff in buffList)
        {
            if (buff.GetType().Name.Equals(_buffName))
            {
                isBuffFound = true;
                break;
            }
        }

        if (isBuffFound)
        {
            SkipTurn skipTurn = new SkipTurn();
            skipTurn.Turns = _turns;

            bool isInserted = target.BuffList.TryInsert(skipTurn);
            if (isInserted)
            {
                skipTurn.RunAction(source, target, card, manager);
            }
        }
    }