public void GainPossessions(InvestigatorPossessions possessions) { shipTickets += possessions.shipTickets; if (shipTickets > 2) { shipTickets = 2; } trainTickets += possessions.trainTickets; if (trainTickets > 2) { trainTickets = 2; } focusTokens += possessions.focusTokens; if (focusTokens > 2) { focusTokens = 2; } foreach (Asset a in possessions.assets) { assets.Add(a); a.ownedInvestigator = this; } foreach (Spell s in possessions.spells) { spells.Add(s); s.owner = this; } foreach (Clue c in possessions.clues) { clues.Add(c); } App.Controller.previewedInvestigatorController.UpdateInvestigator(); }
// Called when you Die, not Devoured public void DeathEvent() { LeaveGame(); if (currentHealth <= 0) { deathEncounter = SetDeathEncounter(true); } else if (currentSanity <= 0) { deathEncounter = SetDeathEncounter(false); } possessions = new InvestigatorPossessions(shipTickets, trainTickets, focusTokens, assets, clues, spells); bool relocate = false; if (currentLocation.type != LocationType.City) { relocate = true; Location l = App.Controller.locationController.FindNearestSpaceOfType(currentLocation, LocationType.City)[0]; // Choose which City to move body to? App.Controller.locationController.MoveInvestigator(this, l); } App.Controller.locationController.InvestigatorDiedOnLocation(this, currentLocation); // Return conditions to pool foreach (Condition c in conditions) { c.Lost(); c.owner = null; App.Model.conditionModel.ReturnConditionToPool(c); } conditions.Clear(); App.Controller.previewedInvestigatorController.UpdateInvestigator(); App.Controller.deadInvestigatorMenuController.InvestigatorDied(this, relocate); }