public void UpdateZonePos(Entity entity, TAG_ZONE zone, int turn) { switch (zone) { case TAG_ZONE.HAND: Hand.Sort(ZonePosComparison); if (!IsLocalPlayer && turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardMark = CardMark.Coin; Hand[4].Created = true; Deck.Add(new CardEntity(null)); Log("Coin", Hand[4]); } break; case TAG_ZONE.PLAY: //entites needs to be updated sometimes - why? var cardEntity = GetEntityFromCollection(Board, entity); if (cardEntity != null) { cardEntity.Entity = entity; } Board.Sort(ZonePosComparison); break; } }
public override bool CanAcceptTags(int controllerId, TAG_ZONE zoneTag, TAG_CARDTYPE cardType) { if (!base.CanAcceptTags(controllerId, zoneTag, cardType)) { return(false); } return(cardType == TAG_CARDTYPE.MINION); }
public static string GetZoneActor(Entity entity, TAG_ZONE zoneTag) { if (ShouldObfuscate(entity) && (zoneTag == TAG_ZONE.PLAY)) { return("Card_Play_Obfuscated"); } return(GetZoneActor(entity.GetCardType(), entity.GetClass(), zoneTag, entity.GetController(), entity.GetPremiumType())); }
private void EntityAdded(int id, TAG_ZONE zone, int controller, LogWatcher.Logger logger) { if (zone == TAG_ZONE.DECK) { logger.Info(String.Format( "New Entity {0} to controller {1}'s deck.", id, controller.ToString())); } }
public void HandleZonePositionUpdate(ActivePlayer player, TAG_ZONE zone, int turn) { if (player == ActivePlayer.Player) { _game.Player.UpdateZonePos(zone, turn); } else if (player == ActivePlayer.Opponent) { _game.Opponent.UpdateZonePos(zone, turn); } }
public List <Zone> FindZonesForTag(TAG_ZONE zoneTag) { object[] objArray1 = new object[] { zoneTag }; Class267 <Zone> class2 = base.method_14 <Class267 <Zone> >("FindZonesForTag", objArray1); if (class2 != null) { return(class2.method_25()); } return(null); }
public override bool CanAcceptTags(int controllerId, TAG_ZONE zoneTag, TAG_CARDTYPE cardType) { if (!base.CanAcceptTags(controllerId, zoneTag, cardType)) { return(false); } if (cardType != TAG_CARDTYPE.HERO_POWER) { return(false); } return(true); }
public override string DetermineActorNameForZone(Entity entity, TAG_ZONE zoneTag) { if (((zoneTag == TAG_ZONE.DECK) || (zoneTag == TAG_ZONE.GRAVEYARD)) || ((zoneTag == TAG_ZONE.REMOVEDFROMGAME) || (zoneTag == TAG_ZONE.SETASIDE))) { return("Card_Invisible"); } if (zoneTag == TAG_ZONE.SECRET) { return(base.DetermineActorNameForZone(entity, zoneTag)); } return("Card_Hidden"); }
private void EntityZoneChanged( int id, TAG_ZONE prev_zone, int prev_controller, TAG_ZONE current_zone, int current_controller, LogWatcher.Logger logger) { if (prev_zone == TAG_ZONE.DECK) { logger.Info(string.Format( "Entity {0} moved from controller {1}'s deck", id.ToString(), prev_controller.ToString())); } }
public virtual bool CanAcceptTags(int controllerId, TAG_ZONE zoneTag, TAG_CARDTYPE cardType) { if (this.m_ServerTag != zoneTag) { return(false); } if ((this.m_controller != null) && (this.m_controller.GetPlayerId() != controllerId)) { return(false); } if (cardType == TAG_CARDTYPE.ENCHANTMENT) { return(false); } return(true); }
public void UpdateZonePos(TAG_ZONE zone, int turn) { switch (zone) { case TAG_ZONE.HAND: Hand.Sort(ZonePosComparison); if (!IsLocalPlayer && turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardMark = CardMark.Coin; Hand[4].Created = true; Deck.Add(new CardEntity(null)); Log("Coin", Hand[4]); } break; case TAG_ZONE.PLAY: Board.Sort(ZonePosComparison); break; } }
public void UpdateZonePos(Entity entity, TAG_ZONE zone, int turn) { //Todo: figure out why CardEntity.Entity needs to be updated manually for zonepos to be correct. switch (zone) { case TAG_ZONE.HAND: UpdateCardEntity(entity); Hand.Sort(ZonePosComparison); if (!IsLocalPlayer && turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardId = HearthDb.CardIds.NonCollectible.Neutral.TheCoin; Hand[4].Created = true; Log("Coin " + Hand[4]); } break; case TAG_ZONE.PLAY: UpdateCardEntity(entity); Board.Sort(ZonePosComparison); break; } }
public void UpdateZonePos(Entity entity, TAG_ZONE zone, int turn) { //Todo: figure out why CardEntity.Entity needs to be updated manually for zonepos to be correct. switch (zone) { case TAG_ZONE.HAND: UpdateCardEntity(entity); Hand.Sort(ZonePosComparison); if (!IsLocalPlayer && turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardMark = CardMark.Coin; Hand[4].Created = true; Deck.Add(new CardEntity(null)); Log("Coin " + Hand[4]); } break; case TAG_ZONE.PLAY: UpdateCardEntity(entity); Board.Sort(ZonePosComparison); break; } }
public void NotifyEntityTagChanged(int id, State.ReadOnlyEntity prev, LogWatcher.Logger logger) { State.ReadOnlyEntity current = entities_.Items[id]; int current_controller = current.GetTagOrDefault(GameTag.CONTROLLER, -1); TAG_ZONE current_zone = (TAG_ZONE)current.GetTagOrDefault(GameTag.ZONE, (int)TAG_ZONE.INVALID); if (current_controller < 0) { return; } if (current_zone == TAG_ZONE.INVALID) { return; } if (prev != null) { if (prev.Id != id) { logger.Info("entity id should not be changed."); return; } int prev_controller = prev.GetTagOrDefault(GameTag.CONTROLLER, -1); TAG_ZONE prev_zone = (TAG_ZONE)prev.GetTagOrDefault(GameTag.ZONE, (int)TAG_ZONE.INVALID); if (prev_controller >= 0 && prev_zone != TAG_ZONE.INVALID) { if (prev_controller == current_controller && prev_zone == current_zone) { return; } EntityZoneChanged(id, prev_zone, prev_controller, current_zone, current_controller, logger); } } EntityAdded(id, current_zone, current_controller, logger); }
public static string GetZoneActor(EntityDef entityDef, TAG_ZONE zoneTag) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.Class, Class272.Enum20.ValueType }; object[] objArray1 = new object[] { entityDef, zoneTag }; return(MonoClass.smethod_13(TritonHs.MainAssemblyPath, "", "ActorNames", "GetZoneActor", enumArray1, objArray1)); }
public void UpdateZonePos(TAG_ZONE zone, int turn) { switch(zone) { case TAG_ZONE.HAND: Hand.Sort(ZonePosComparison); if(turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardMark = CardMark.Coin; Hand[4].Created = true; Deck.Add(new CardEntity(null)); Log("Coin", Hand[4]); } break; case TAG_ZONE.PLAY: Board.Sort(ZonePosComparison); break; } }
public static string GetZoneActor(TAG_CARDTYPE cardType, TAG_CLASS classTag, TAG_ZONE zoneTag, Player controller, TAG_PREMIUM premium) { object[] objArray1 = new object[] { cardType, classTag, zoneTag, controller, premium }; return(MonoClass.smethod_13(TritonHs.MainAssemblyPath, "", "ActorNames", "GetZoneActor", new Class272.Enum20[] { Class272.Enum20.ValueType }, objArray1)); }
public void SetSourceZoneTag(TAG_ZONE tag) { this.m_sourceZoneTag = tag; }
public bool IsInZone(TAG_ZONE zone) => HasTag(GAME_TAG.ZONE) && GetTag(GAME_TAG.ZONE) == (int)zone;
public string DetermineActorNameForZone(Triton.Game.Mapping.Entity entity, TAG_ZONE zoneTag) { object[] objArray1 = new object[] { entity, zoneTag }; return(base.method_13("DetermineActorNameForZone", objArray1)); }
public bool IsInZone(TAG_ZONE zone) { return(HasTag(GAME_TAG.ZONE) && GetTag(GAME_TAG.ZONE) == (int)zone); }
public void SetDestinationZoneTag(TAG_ZONE tag) { object[] objArray1 = new object[] { tag }; base.method_8("SetDestinationZoneTag", objArray1); }
public void UpdateZonePos(Entity entity, TAG_ZONE zone, int turn) { //Todo: figure out why CardEntity.Entity needs to be updated manually for zonepos to be correct. switch(zone) { case TAG_ZONE.HAND: UpdateCardEntity(entity); Hand.Sort(ZonePosComparison); if(!IsLocalPlayer && turn == 0 && Hand.Count == 5 && Hand[4].Entity.Id > 67) { Hand[4].CardMark = CardMark.Coin; Hand[4].Created = true; Deck.Add(new CardEntity(null)); Log("Coin", Hand[4]); } break; case TAG_ZONE.PLAY: UpdateCardEntity(entity); Board.Sort(ZonePosComparison); break; } }
public void ChangeTag(int id, GameTag tag, int value) { TAG_ZONE prev_zone = (TAG_ZONE)items_[id].GetTagOrDefault(GameTag.ZONE, (int)TAG_ZONE.INVALID); items_[id].SetTag(tag, value); }
public void SetSourceZoneTag(TAG_ZONE tag) { object[] objArray1 = new object[] { tag }; base.method_8("SetSourceZoneTag", objArray1); }
public static bool IsInZone(Card card, TAG_ZONE zone) { return (bool)call(InputManager.Get(), "IsInZone", new Type[] { typeof(Card), typeof(TAG_ZONE) }, card, zone); }
public static bool IsInZone(this Entity entity, TAG_ZONE zone) { return(entity.HasTag(GAME_TAG.ZONE) && entity.GetTag(GAME_TAG.ZONE) == (int)zone); }
public void SetDestinationZoneTag(TAG_ZONE tag) { this.m_destinationZoneTag = tag; }
public static string GetZoneActor(EntityDef entityDef, TAG_ZONE zoneTag, TAG_PREMIUM premium) { object[] objArray1 = new object[] { entityDef, zoneTag, premium }; return(MonoClass.smethod_13(TritonHs.MainAssemblyPath, "", "ActorNames", "GetZoneActor", new Class272.Enum20[] { Class272.Enum20.Class }, objArray1)); }
public bool IsInZone(TAG_ZONE zone) { return (TAG_ZONE)GetTag(GAME_TAG.ZONE) == zone; }
public bool IsInZone(Card card, TAG_ZONE zoneTag) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.Class, Class272.Enum20.ValueType }; object[] objArray1 = new object[] { card, zoneTag }; return(base.method_10 <bool>("IsInZone", enumArray1, objArray1)); }
public bool IsInZone(TAG_ZONE zone) { return HasTag(GAME_TAG.ZONE) && GetTag(GAME_TAG.ZONE) == (int)zone; }
public bool CanAcceptTags(int controllerId, TAG_ZONE zoneTag, TAG_CARDTYPE cardType) { object[] objArray1 = new object[] { controllerId, zoneTag, cardType }; return(base.method_11 <bool>("CanAcceptTags", objArray1)); }
public bool IsInZone(Triton.Game.Mapping.Entity entity, TAG_ZONE zoneTag) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.Class, Class272.Enum20.ValueType }; object[] objArray1 = new object[] { entity, zoneTag }; return(base.method_10 <bool>("IsInZone", enumArray1, objArray1)); }
public void HandleZonePositionUpdate(ActivePlayer player, Entity entity, TAG_ZONE zone, int turn) { if(player == ActivePlayer.Player) _game.Player.UpdateZonePos(entity, zone, turn); else if(player == ActivePlayer.Opponent) _game.Opponent.UpdateZonePos(entity, zone, turn); }
public virtual string DetermineActorNameForZone(Entity entity, TAG_ZONE zoneTag) { return(ActorNames.GetZoneActor(entity, zoneTag)); }