public void OngoingEffectLeftLocation(OngoingEffect effect) { if (ongoingEffectsOnLocation.Contains(effect)) { ongoingEffectsOnLocation.Remove(effect); } }
public void ResolveOngoingEffect(OngoingEffect oe) { App.Model.ongoingEffectModel.OngoingEffectFinished(oe); Location l = App.Model.locationModel.FindLocationByName(oe.location); App.Controller.locationController.ResolveOngoingEffect(oe, l); }
public override void Reset() { base.Reset(); OngoingEffect?.Remove(); Game.OneTurnEffects.RemoveAll(p => p.entityId == Id); if (ToBeDestroyed) { Game.DeadMinions.Remove(OrderOfPlay); ToBeDestroyed = false; } }
public void NewOngoingEffect(OngoingEffect oe) { foreach (OngoingEffect o in activeOngoingEffects) { if (o.effectTitle == oe.effectTitle) { return; } } activeOngoingEffects.Add(oe); oe.Spawned(); App.View.ongoingEffectView.OngoingEffectsChanged(); }
public void OngoingEffectEnteredLocation(OngoingEffect effect) { // Shouldn't need this, same rumor should never be added again foreach (OngoingEffect e in ongoingEffectsOnLocation) { if (e.effectTitle == effect.effectTitle) { return; } } ongoingEffectsOnLocation.Add(effect); }
public void RumorStarted() { rumorMenu.SetActive(true); App.Controller.openMenuController.OpenMenu(rumorMenu); OngoingEffect rumor = App.Model.rumorMythosModel.currentRumor; mythosTitle.text = rumor.effectTitle; mythosText.text = rumor.effectText; if (rumor.location == "") { locationInfo.SetActive(false); } else { locationInfo.SetActive(true); locationText.text = rumor.location; } if (rumor.eldritchTokens == 0) { eldritchInfo.SetActive(false); } else { eldritchInfo.SetActive(true); eldritchText.text = "" + rumor.eldritchTokens; } if (rumor.reckoningText == "") { reckoningInfo.SetActive(false); } else { reckoningInfo.SetActive(true); reckoningText.text = rumor.reckoningText; } }
public void SpawnOngoingEffect(OngoingEffect effect, Location l) { l.OngoingEffectEnteredLocation(effect); App.View.locationView.LocationUpdated(l); }
public void ResolveOngoingEffect(OngoingEffect effect, Location l) { l.OngoingEffectLeftLocation(effect); App.View.locationView.LocationUpdated(l); }
//private bool ChargeBuffed() //{ // if (NumAttacksThisTurn == 0 && HasCharge && IsExhausted) // { // IsExhausted = false; // } // return true; //} /// <summary>Disables all special effects on this minion. /// It's not possible to undo a silence! /// </summary> public void Silence() { HasTaunt = false; IsFrozen = false; IsEnraged = false; HasCharge = false; HasWindfury = false; HasDivineShield = false; HasStealth = false; HasDeathrattle = false; HasBattleCry = false; HasInspire = false; HasLifeSteal = false; CantBeTargetedByHeroPowers = false; CantBeTargetedBySpells = false; IsImmune = false; int sp = this[GameTag.SPELLPOWER]; if (sp > 0) { Controller.CurrentSpellPower -= sp; this[GameTag.SPELLPOWER] = 0; } OngoingEffect?.Remove(); Game.OneTurnEffects.RemoveAll(p => p.entityId == Id); ActivatedTrigger?.Remove(); //Controller.BoardZone.Auras.ForEach(aura => aura.EntityRemoved(this)); if (AppliedEnchantments != null) { for (int i = AppliedEnchantments.Count - 1; i >= 0; i--) { if (AppliedEnchantments[i].Creator.Power?.Aura != null) { continue; } AppliedEnchantments[i].Remove(); } } AttackDamage = Card[GameTag.ATK]; if (Health > Card[GameTag.HEALTH]) { Health = Card[GameTag.HEALTH]; } else { int cardBaseHealth = Card[GameTag.HEALTH]; int delta = BaseHealth - cardBaseHealth; if (delta > 0) { Damage -= delta; } this[GameTag.HEALTH] = Card[GameTag.HEALTH]; } if (_data.Tags.TryGetValue(GameTag.CONTROLLER_CHANGED_THIS_TURN, out int v) && v > 0) { Game.TaskQueue.Execute(new ControlTask(EntityType.SOURCE, true), Controller, this, null); this[GameTag.CONTROLLER_CHANGED_THIS_TURN] = 0; } if (_history && Card[GameTag.TRIGGER_VISUAL] == 1) { this[GameTag.TRIGGER_VISUAL] = 0; } IsSilenced = true; Game.Log(LogLevel.INFO, BlockType.PLAY, "Minion", !Game.Logging? "":$"{this} got silenced!"); }
public void NewOngoingEffect(OngoingEffect oe) { App.Model.ongoingEffectModel.NewOngoingEffect(oe); }
public void OngoingEffectUpdated(OngoingEffect oe) { App.View.ongoingEffectView.OngoingEffectsChanged(); App.View.locationView.LocationUpdated(App.Model.locationModel.FindLocationByName(oe.location)); }
public override void Reset() { base.Reset(); OngoingEffect?.Remove(); }
public void OngoingEffectFinished(OngoingEffect oe) { activeOngoingEffects.Remove(oe); oe.Resolved(); App.View.ongoingEffectView.OngoingEffectsChanged(); }
public void StartRumor(OngoingEffect rumor) { currentRumor = rumor; App.View.rumorMythosView.RumorStarted(); }
public void ChooseOngoingEffectEncounter(OngoingEffect oe) { App.View.encounterPhaseView.EncounterChosen(); oe.StartEncounter(); }