コード例 #1
0
    public override void NotifyOfEvent(AbstractEvent eventData)
    {
        EventAmbientStateShift data = (EventAmbientStateShift)eventData;

        if (data.newState > data.oldState)
        {
            NegotiationManager.Instance.AddAction(new DrawCardsAction(this.OWNER, this.stacks));
        }
    }
コード例 #2
0
 public override void NotifyOfEvent(AbstractEvent eventData)
 {
     if (eventData.type == EventType.AMBIENCE_STATE_SHIFT && !costModifiedThisTurn)
     {
         EventAmbientStateShift data = (EventAmbientStateShift)eventData;
         if (data.newState < data.oldState)
         {
             storeOldCost         = this.COST;   // Save current cost, which may be modified over the course of the negotiation
             this.COST            = 0;           // Set cost to 0.
             costModifiedThisTurn = true;        // Enable end-of-turn event
         }
     }
     if (eventData.type == EventType.TURN_END && costModifiedThisTurn)
     {
         this.COST            = storeOldCost;
         costModifiedThisTurn = false;
     }
 }