public virtual void OnPostTake(ChestEventArgs chestEventArgs) { if (PostItem != null) { PostItem(this, chestEventArgs); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestRangerPaths.TREASURE_CHEST, true); //Reload LocationHandler.ResetLocation(TINY_ISLAND_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.TREASURE, true); //Reload LocationHandler.ResetLocation(ABANDONED_FORTRESS_GATES); } }
public void FleetMasterChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.FLEET_MASTER_CHEST, true); //Reload LocationHandler.ResetLocation(FLEET_MASTERS_SHIP_KEY); } }
public void SpyMasterChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.SPY_MASTER_TREASURE, true); //Reload LocationHandler.ResetLocation(NORTH_ROOM_KEY); } }
public void LeaderChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouForestCabin.TOOK_TREASURE, true); // Reload LocationHandler.ResetLocation(BEDROOM_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAncientBurialGrounds.TREASURE, true); //Reload LocationHandler.ResetLocation(DESERTED_RITUAL_GROUNDS); } }
public void CoordinatorChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.TOOK_TREASURE, true); // Reload LocationHandler.ResetLocation(COORDINATION_ROOM_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.TREASURE, true); //Reload LocationHandler.ResetLocation(SCOUT_LEADER_TENT_KEY); } }
public void DarkMasterChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.DARK_MASTER_TREASURE, true); //Reload LocationHandler.ResetLocation(DARK_MASTERS_OFFICE); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.TREASURE_CHEST, true); //Reload LocationHandler.ResetLocation(CEMETERY_NORTH_END_KEY); } }
public void NecroChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestCabin.OPENED_BOSS_CHEST_ROOM_SIX, true); // Reload LocationHandler.ResetLocation(ROOM_FOUR_KEY); } }
public void SpyChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditHouse.OPENED_SPY_CHEST, true); // Reload LocationHandler.ResetLocation(ROOM_SIX_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCatacomb.TREASURE_CHEST, true); //Reload LocationHandler.ResetLocation(SECRET_TOMB_KEY); } }
public void TorturerChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.TOOK_TREASURE, true); // Reload LocationHandler.ResetLocation(TORTURE_CHAMBER_KEY); } }
public void CaptainChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.CAPTAIN_TREASURE, true); //Reload LocationHandler.ResetLocation(PIRATE_CAPTAINS_TENT_KEY); } }
public void Treasure(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenInconspicousCave.TREASURE, true); //Reload LocationHandler.ResetLocation(RITUAL_ROOM_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.TREASURE_CHEST, true); //Reload LocationHandler.ResetLocation(UPSTAIRS_MASTER_BEDROOM_KEY); } }
public void Treasure(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenSwampland.TREASURE, true); //Reload LocationHandler.ResetLocation(RUINED_CASTLE_KEY); } }
public void TreasureChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenOldForestRuins.TREASURE, true); //Reload LocationHandler.ResetLocation(TOWN_HALL_KEY); } }
public void MaskedBanditChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.MASKED_BANDIT_TREASURE, true); //Reload LocationHandler.ResetLocation(MAYORS_HOUSE_KEY); } }
public void Chest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouNecromancerCamp.OPENED_CHEST, true); // Reload LocationHandler.ResetLocation(LEADER_TENT_KEY); } }
public void NecroIntelligenceOfficerChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerHiddenCamp.NECRO_OFFICER_CHEST, true); //Reload LocationHandler.ResetLocation(NECRO_OFFICER_TENT_KEY); } }
public void RoomThreeChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.OPENED_CHEST_ROOM_THREE, true); // Reload LocationHandler.ResetLocation(ROOM_THREE_KEY); } }
public void ContractorChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.TOOK_TREASURE, true); // Reload LocationHandler.ResetLocation(DARK_ROOM_KEY); } }
public void OverseerChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundHideOut.TOOK_NECRO_OVERSEER_TREASURE, true); // Reload LocationHandler.ResetLocation(OVERSEER_QUARTERS_KEY); } }
public void GuardChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestAfterSewer.OPENED_BOSS_CHEST_ENCLOSED_CLEARING, true); // Reload LocationHandler.ResetLocation(ENCLOSED_CLEARING_KEY); } }
public void StorageChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundHideOut.TOOK_STORAGE_TREASURE, true); // Reload LocationHandler.ResetLocation(STORAGE_KEY); } }
public void SkeletonKingChest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerRight.OPENED_SKELETON_KING_CHEST, true); // Reload LocationHandler.ResetLocation(ROOM_THREE_KEY); } }
public void Chest(object sender, ChestEventArgs chestEventArgs) { if (chestEventArgs.ChestResults == ChestResults.Taken) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.OPENED_CHEST, true); // Reload LocationHandler.ResetLocation(MASTER_ROOM_KEY); } }
public void PopulateWithArgs20() { ChestEventArgs chestEventArgs; chestEventArgs = new ChestEventArgs(0); ((GameEventArgs)chestEventArgs).SenderId = 0; ((GameEventArgs)chestEventArgs).EventId = (string)null; ((GameEventArgs)chestEventArgs).EventType = (EventType)0; ((GameEventArgs)chestEventArgs).NeedResponse = false; string[] ss = new string[1]; ss[0] = "1"; this.PopulateWithArgs(chestEventArgs, ss); Assert.IsNotNull((object)chestEventArgs); Assert.AreEqual<int>(1, chestEventArgs.ChestId); Assert.AreEqual<int>(0, ((GameEventArgs)chestEventArgs).SenderId); Assert.AreEqual<string>((string)null, ((GameEventArgs)chestEventArgs).EventId); Assert.AreEqual<EventType> ((EventType)0, ((GameEventArgs)chestEventArgs).EventType); Assert.AreEqual<bool>(false, ((GameEventArgs)chestEventArgs).NeedResponse); }
public void ToString01785() { ChestEventArgs chestEventArgs; string s; chestEventArgs = new ChestEventArgs(0); ((GameEventArgs)chestEventArgs).SenderId = 0; ((GameEventArgs)chestEventArgs).EventId = (string)null; ((GameEventArgs)chestEventArgs).EventType = (EventType)0; ((GameEventArgs)chestEventArgs).NeedResponse = false; s = this.ToString01(chestEventArgs); Assert.AreEqual<string>("0", s); Assert.IsNotNull((object)chestEventArgs); Assert.AreEqual<int>(0, chestEventArgs.ChestId); Assert.AreEqual<int>(0, ((GameEventArgs)chestEventArgs).SenderId); Assert.AreEqual<string>((string)null, ((GameEventArgs)chestEventArgs).EventId); Assert.AreEqual<EventType> ((EventType)0, ((GameEventArgs)chestEventArgs).EventType); Assert.AreEqual<bool>(false, ((GameEventArgs)chestEventArgs).NeedResponse); }
public void PopulateWithArgsThrowsContractException154() { try { ChestEventArgs chestEventArgs; chestEventArgs = new ChestEventArgs(0); ((GameEventArgs)chestEventArgs).SenderId = 0; ((GameEventArgs)chestEventArgs).EventId = (string)null; ((GameEventArgs)chestEventArgs).EventType = (EventType)0; ((GameEventArgs)chestEventArgs).NeedResponse = false; string[] ss = new string[1]; ss[0] = "\0"; this.PopulateWithArgs(chestEventArgs, ss); throw new AssertFailedException("expected an exception of type ContractException"); } catch(Exception ex) { if (!PexContract.IsContractException(ex)) throw ex; } }
public ChestEventArgs Constructor(int chestId) { ChestEventArgs target = new ChestEventArgs(chestId); return target; // TODO: add assertions to method ChestEventArgsTest.Constructor(Int32) }
private void OpenChest(object sender, ChestEventArgs eventArgs) { Contract.Requires(CurrentState == State.WaitForPerformAction); Contract.Ensures(CurrentState == State.AllEquip); Chest chest = gameState.getChest(eventArgs.ChestId); // Remove movement Player.Instance.HeroParty.Heroes[gameState.CurrentPlayer].RemoveMovement(2); // Give conquest tokens to the hero party Player.Instance.HeroParty.AddConquestTokens(chest.ConquestTokens); // Give coins to each hero foreach (Hero hero in Player.Instance.HeroParty.Heroes.Values) { hero.Coins += chest.Coin; } // Give threat tokens to the overlord Player.Instance.Overlord.ThreatTokens += Player.Instance.HeroParty.Heroes.Count * chest.Curses; // Go into equip stateMachine.PlaceStates(State.OpenChest, State.AllEquip, State.WaitForPerformAction); AllPlayersRemainEquip(); stateMachine.ChangeToNextState(); stateMachine.ChangeToNextState(); // If we are the server, we are responsible for giving out treasures in the chest. if (Player.Instance.IsServer) { // Get a treasure for each hero Treasure[] treasures = gameState.getTreasures(Player.Instance.HeroParty.Heroes.Count, chest.Rarity); int treasureCount = 0; foreach (int heroPlayerId in Player.Instance.HeroParty.Heroes.Keys) { GiveTreasure(heroPlayerId, treasures[treasureCount]); treasureCount++; } } }
public ChestEventArgs Constructor01(string[] stringArgs) { ChestEventArgs target = new ChestEventArgs(stringArgs); return target; // TODO: add assertions to method ChestEventArgsTest.Constructor01(String[]) }