Ejemplo n.º 1
0
    void HandleOnCardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
    {
        ZoneControllerAbstract fromZoneController = _zonesIngames[fromZone];
        ZoneControllerAbstract toZoneController = _zonesIngames[toZone];
        CardController cardController = _cardsInGame[card];

        if (fromZoneController != null && toZoneController != null && card != null)
        {
            fromZoneController.RemoveCardFromZone(cardController);
            toZoneController.AddCardToZone(cardController);
        }
    }
Ejemplo n.º 2
0
 private void CardChangeZoneHandler(NWCard card, NWZone fromZone, NWZone toZone)
 {
     if (Type == NWAbilityType.Triggered)
     {
         switch (Trigger.Type)
         {
         case NWTriggerType.EnterZone:
         {
             if (Trigger.ToZone == toZone.Type && Trigger.Target.IsCardMatchTarget(_parentCard, card))
             {
                 ResolveAbilityEvent();
             }
             break;
         }
         default:
         {
             break;
         }
         }
     }
 }
Ejemplo n.º 3
0
    public virtual void SetZone(NWZone zone, INWPlayer player)
    {
        _cardsInZone = new List<CardController>();
        _zoneData = zone;
        _zoneType = zone.Type;
        _player = player;

        InitializeZoneController();
    }
Ejemplo n.º 4
0
 void HandleOnCardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     fromZone.RemoveCardFromZone(card);
     toZone.AddCard(card);
 }
Ejemplo n.º 5
0
 private void ZoneUpdated(NWZone zone)
 {
     if (OnZoneUpdated != null)
     {
         OnZoneUpdated(zone);
     }
 }
Ejemplo n.º 6
0
 private void CardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     if (OnCardChangeZone != null)
     {
         OnCardChangeZone(card, fromZone, toZone);
     }
 }
Ejemplo n.º 7
0
 public static NWEvent CardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     Hashtable data = new Hashtable();
     data.Add((int)eEventField.Card , card.CardUniqueID);
     data.Add((int)eEventField.FromZone, fromZone.ZoneID);
     data.Add((int)eEventField.ToZone, toZone.ZoneID);
     NWEvent eventObject = new NWEvent(NWEventType.CardChangeZone, data);
     return eventObject;
 }
Ejemplo n.º 8
0
 public static NWEvent ZoneUpdated(NWZone zone)
 {
     Hashtable data = new Hashtable();
     data.Add((int)eEventField.Zone, zone.ZoneID);
     NWEvent eventObject = new NWEvent(NWEventType.ZoneUpdated, data);
     return eventObject;
 }