// defensive portion private void RegisterWampaDefenseAbility(GenericShip ship) { if (HostShip.State.Charges > 0) { RegisterAbilityTrigger(TriggerTypes.OnAttackFinish, delegate { Messages.ShowInfo("Wampa lost a charge after defending!"); HostShip.RemoveCharge(Triggers.FinishTrigger); }); } }
private void UseIdenVersioAbilitySE(object sender, System.EventArgs e) { // Are there any non-crit damage results in the damage queue? if (HostShip.State.Charges > 0) { // If there are we prompt to see if they want to use the ability. AskToUseAbility(AlwaysUseByDefault, delegate { HostShip.RemoveCharge(BlankDamage); }); } else { Triggers.FinishTrigger(); } }
private void UseDaceBonearmAbility(object sender, EventArgs e) { DecisionSubPhase.ConfirmDecisionNoCallback(); Messages.ShowInfo("Ability of Dace Bonearm is used"); for (int i = 0; i < 3; i++) { //Empty delegate is safe here - Sandrem HostShip.RemoveCharge(delegate { }); } IonizedShip.Tokens.AssignToken( typeof(IonToken), delegate { IonizedShip.Tokens.AssignToken(typeof(IonToken), Triggers.FinishTrigger); } ); }
private void UseIdenVersioAbilitySE(object sender, System.EventArgs e) { // Are there any non-crit damage results in the damage queue? if (HostShip.State.Charges > 0) { // If there are we prompt to see if they want to use the ability. AskToUseAbility( HostShip.PilotInfo.PilotName, AlwaysUseByDefault, delegate { HostShip.RemoveCharge(BlankDamage); }, descriptionLong: "Do you want to spend 1 Charge to prevent damage?", imageHolder: HostShip ); } else { Triggers.FinishTrigger(); } }
private void LoseCharge(object sender, System.EventArgs e) { Messages.ShowInfo(HostShip.PilotInfo.PilotName + " loses 1 charge"); HostShip.RemoveCharge(Triggers.FinishTrigger); }
private void LoseCharge(object sender, System.EventArgs e) { Messages.ShowInfo("Autopilot Drone loses 1 charge"); HostShip.RemoveCharge(Triggers.FinishTrigger); }
private void UseAbility(object sender, System.EventArgs e) { HostShip.AfterGotNumberOfPrimaryWeaponAttackDice += WampaAddAttackDice; HostShip.RemoveCharge(SubPhases.DecisionSubPhase.ConfirmDecision); }