private void AskPerformFreeAction(object sender, System.EventArgs e) { if (HostShip.State.Force > 0) { Messages.ShowInfoToHuman(HostUpgrade.UpgradeInfo.Name + ": You may spend a force token to perform free action"); HostShip.BeforeFreeActionIsPerformed += PayForceToken; HostShip.OnActionIsPerformed += CheckSupernaturalReflexesDamage; HostShip.OnActionIsSkipped += DeregisterSupernaturalReflexesEvents; HostShip.AskPerformFreeAction ( new List <GenericAction>() { new BoostAction(), new BarrelRollAction() }, Triggers.FinishTrigger ); } else { Triggers.FinishTrigger(); } }
private void PerformAction(object sender, System.EventArgs e) { var ship = Selection.ThisShip; Roster.HighlightPlayer(HostShip.Owner.PlayerNo); Selection.ChangeActiveShip(HostShip); bool oldValue = HostShip.CanPerformActionsWhileStressed; HostShip.CanPerformActionsWhileStressed = true; //List<GenericAction> actions = Selection.ThisShip.ActionBar.AllActions; List <GenericAction> actions = Selection.ThisShip.GetAvailableActions(); HostShip.CanPerformActionsWhileStressed = oldValue; foreach (GenericAction action in actions) { action.CanBePerformedWhileStressed = true; } HostShip.AskPerformFreeAction( actions, delegate { Roster.HighlightPlayer(ship.Owner.PlayerNo); Selection.ChangeActiveShip(ship); Triggers.FinishTrigger(); }, HostShip.PilotInfo.PilotName, "After another friendly ship is destroyed, you may perform an action, even while stressed", HostShip ); }
private void BB8AskBarrelRoll(object sender, EventArgs e) { HostShip.AskPerformFreeAction(new List <ActionsList.GenericAction>() { new ActionsList.BarrelRollAction() }, Triggers.FinishTrigger); }
private void PerformAction(object sender, System.EventArgs e) { Messages.ShowInfoToHuman("\"Avenger\": a friendly ship was destroyed you may to perform an action"); var ship = Selection.ThisShip; Roster.HighlightPlayer(HostShip.Owner.PlayerNo); Selection.ChangeActiveShip(HostShip); bool oldValue = HostShip.CanPerformActionsWhileStressed; HostShip.CanPerformActionsWhileStressed = true; //List<GenericAction> actions = Selection.ThisShip.ActionBar.AllActions; List <GenericAction> actions = Selection.ThisShip.GetAvailableActions(); HostShip.CanPerformActionsWhileStressed = oldValue; foreach (GenericAction action in actions) { action.CanBePerformedWhileStressed = true; } HostShip.AskPerformFreeAction(actions, delegate { Roster.HighlightPlayer(ship.Owner.PlayerNo); Selection.ChangeActiveShip(ship); Triggers.FinishTrigger(); }); }
private void UseAbility(object sender, EventArgs e) { if (HostShip.AssignedManeuver.ColorComplexity == MovementComplexity.Complex && HostUpgrade.State.Charges > 0) { HostShip.BeforeActionIsPerformed += SpendCharge; HostShip.OnCheckCanPerformActionsWhileStressed += ConfirmThatIsPossible; HostShip.OnCanPerformActionWhileStressed += AlwaysAllow; List <GenericAction> actions = HostShip.GetAvailableActions(); HostShip.AskPerformFreeAction( actions, delegate { HostShip.OnCheckCanPerformActionsWhileStressed -= ConfirmThatIsPossible; HostShip.OnCanPerformActionWhileStressed -= AlwaysAllow; HostShip.BeforeActionIsPerformed -= SpendCharge; Triggers.FinishTrigger(); }, HostUpgrade.UpgradeInfo.Name, "After you fully execute a red maneuver, you may spend 1 Charge to perform an action, even while stressed", HostUpgrade ); } else { Triggers.FinishTrigger(); } }
private void PerformPushAction(object sender, System.EventArgs e) { List <GenericAction> actions = HostShip.GetAvailableActions(); List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList(); HostShip.AskPerformFreeAction(actionBarActions, AddStressToken); }
private void PerformFreeAction(object sender, System.EventArgs e) { HostShip.GenerateAvailableActionsList(); List <ActionsList.GenericAction> actions = Selection.ThisShip.GetAvailableActionsList(); HostShip.AskPerformFreeAction(actions, Triggers.FinishTrigger); }
private void AskPerformPerositionAction(object sender, System.EventArgs e) { if (!HostShip.IsStressed) { Messages.ShowInfoToHuman("AutoThrusters: you may perform a red action"); HostShip.AskPerformFreeAction( new List <GenericAction>() { new BoostAction() { IsRed = true }, new BarrelRollAction() { IsRed = true } }, Triggers.FinishTrigger ); } else { Triggers.FinishTrigger(); } }
private void PerformBarrelRollNotAction(object sender, System.EventArgs e) { DecisionSubPhase.ConfirmDecisionNoCallback(); Sounds.PlayShipSound("Ill try spinning - thats a good trick!"); BarrelRollAction brAction = new BarrelRollAction { IsRealAction = false }; HostShip.State.SpendForce( 1, delegate { HostShip.AskPerformFreeAction( brAction, Triggers.FinishTrigger, HostShip.PilotInfo.PilotName, "You must perform Barrel Roll (this is not an action)", HostShip, isForced: true ); } ); }
private void AskToUseLeevanTenzaAbility(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction(new EvadeAction() { IsRed = true }, Triggers.FinishTrigger); }
private void AskToPerformPurpleReposition(object sender, EventArgs e) { if (HostShip.State.Force > 0) { HostShip.AskPerformFreeAction( new List <GenericAction>() { new BarrelRollAction() { HostShip = HostShip, Color = ActionColor.Purple }, new BoostAction() { HostShip = HostShip, Color = ActionColor.Purple } }, Triggers.FinishTrigger, descriptionShort: "Intuitive Controls", descriptionLong: "You may perform a purple barrel roll or boost action", imageHolder: HostShip ); } else { Messages.ShowError("No force tokens left"); Triggers.FinishTrigger(); } }
private void AskPerformFreeAction(object sender, System.EventArgs e) { if (HostShip.State.Force > 0) { HostShip.BeforeActionIsPerformed += PayForceToken; HostShip.OnActionIsPerformed += CheckDebuff; HostShip.OnActionIsSkipped += DeregisterDebuffEvents; HostShip.AskPerformFreeAction ( new List <GenericAction>() { new BoostAction(), new BarrelRollAction() }, Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "You may spend 1 Force to perform a Barrel Roll or Boost action. Then, if you performed an action you do not have on your action bar, gain 1 strain token. Skip your action during Activation.", HostUpgrade ); } else { Triggers.FinishTrigger(); } }
private void PerformAction(object sender, System.EventArgs e) { var ship = Selection.ThisShip; Roster.HighlightPlayer(HostShip.Owner.PlayerNo); Selection.ChangeActiveShip(HostShip); HostShip.OnCheckCanPerformActionsWhileStressed += ConfirmThatIsPossible; HostShip.OnCanPerformActionWhileStressed += AlwaysAllow; List <GenericAction> actions = Selection.ThisShip.GetAvailableActions(); HostShip.OnCheckCanPerformActionsWhileStressed -= ConfirmThatIsPossible; HostShip.OnCanPerformActionWhileStressed -= AlwaysAllow; foreach (GenericAction action in actions) { action.CanBePerformedWhileStressed = true; } HostShip.AskPerformFreeAction( actions, delegate { Roster.HighlightPlayer(ship.Owner.PlayerNo); Selection.ChangeActiveShip(ship); Triggers.FinishTrigger(); }, HostShip.PilotInfo.PilotName, "After another friendly ship is destroyed, you may perform an action, even while stressed", HostShip ); }
private void AskPerformFreeAction(object sender, System.EventArgs e) { if (HostShip.State.Force > 0) { HostShip.BeforeActionIsPerformed += PayForceToken; HostShip.OnActionIsPerformed += CheckSupernaturalReflexesDamage; HostShip.OnActionIsSkipped += DeregisterSupernaturalReflexesEvents; HostShip.AskPerformFreeAction ( new List <GenericAction>() { new BoostAction(), new BarrelRollAction() }, Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "Before you activate, you may spend 1 Force to perform a Barrel Roll or Boost action. Then, if you performed an action you do not have on your action bar, suffer 1 damage.", HostUpgrade ); } else { Triggers.FinishTrigger(); } }
private void UseAdvancedSensors(object sender, System.EventArgs e) { List <GenericAction> actions = HostShip.GetAvailableActions(); HostShip.AskPerformFreeAction(actions, SubPhases.DecisionSubPhase.ConfirmDecision); // if ability is used, skipped Perform Action HostShip.IsSkipsActionSubPhase = true; }
private void ProposeFreeEvadeAction(object sender, System.EventArgs e) { Messages.ShowInfo("Stygium Array: You may perform an Evade action"); HostShip.AskPerformFreeAction(new EvadeAction() { HostShip = HostShip }, Triggers.FinishTrigger); }
private void PerformThreatTracker(object sender, EventArgs e) { Selection.ChangeActiveShip(HostShip); HostShip.AskPerformFreeAction( threatTrackerActions, ThreatTrackerCallback ); }
private void UseAbility(object sender, System.EventArgs e) { Messages.ShowInfo(HostUpgrade.UpgradeInfo.Name + ": You can perform free Red Focus action"); HostShip.AskPerformFreeAction(new FocusAction() { IsRed = true }, Triggers.FinishTrigger); }
private void BB8AskBarrelRoll(object sender, EventArgs e) { Sounds.PlayShipSound("BB-8-Sound"); HostShip.AskPerformFreeAction( new BarrelRollAction(), Triggers.FinishTrigger ); }
private void PerformFreeReposition(object sender, System.EventArgs e) { List <GenericAction> actions = new List <GenericAction>() { new BoostAction(), new BarrelRollAction() }; HostShip.AskPerformFreeAction(actions, Triggers.FinishTrigger); }
private void AskToPerformWhiteActionAsRed(object sender, System.EventArgs e) { Messages.ShowInfoToHuman(HostUpgrade.UpgradeInfo.Name + ": You may perform an action"); HostShip.AskPerformFreeAction( HostShip.GetAvailableActionsWhiteOnlyAsRed(), Triggers.FinishTrigger ); }
private void AskPerformAction(object sender, EventArgs e) { HostShip.BeforeFreeActionIsPerformed += SpendCharge; HostShip.AskPerformFreeAction( AbilityActions, CleanUp ); }
private void AskUseAbility(object sender, EventArgs e) { Messages.ShowInfo("AfterBurners: You may spend 1 charge to perform a boost action"); HostShip.BeforeFreeActionIsPerformed += RegisterSpendChargeTrigger; HostShip.AskPerformFreeAction(new BoostAction() { CanBePerformedWhileStressed = true }, CleanUp); }
private void PerformAction(object sender, System.EventArgs e) { HostShip.GenerateAvailableActionsList(); List <GenericAction> actions = Selection.ThisShip.GetAvailableActionsList(); HostShip.BeforeFreeActionIsPerformed += PayForceCost; Messages.ShowInfo("Darth Vader: you may spend 1 force to perform an action"); HostShip.AskPerformFreeAction(actions, CleanUp); }
private void PerformFreeFocusAction(object sender, System.EventArgs e) { List <ActionsList.GenericAction> actions = new List <ActionsList.GenericAction>() { new ActionsList.FocusAction() }; HostShip.AskPerformFreeAction(actions, Triggers.FinishTrigger); }
private void AskUseAbility(object sender, EventArgs e) { Messages.ShowInfo("Virago: You may spend 1 charge to perform a red boost action. There are " + HostUpgrade.Charges + " charges remaining."); HostShip.BeforeFreeActionIsPerformed += RegisterSpendChargeTrigger; Selection.ChangeActiveShip(HostShip); HostShip.AskPerformFreeAction(new BoostAction() { IsRed = true, CanBePerformedWhileStressed = false }, CleanUp); }
protected virtual void TurrPhennirPilotAbility(object sender, EventArgs e) { HostShip.AskPerformFreeAction( new List <ActionsList.GenericAction>() { new ActionsList.BoostAction(), new ActionsList.BarrelRollAction() }, Triggers.FinishTrigger); }
private void AskToPerformFreeAction(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( HostShip.GetAvailableActions(), Triggers.FinishTrigger, HostShip.PilotInfo.PilotName, "After you drop or launch a device, you may perform an action", HostShip ); }
private void PerformFreeCloakAction(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( new CloakAction(), Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "After you perform an attack, you may perform a free Cloak action", HostUpgrade ); }
private void PerformFreeAction() { HostShip.AskPerformFreeAction( HostShip.GetAvailableActions(), FinishAbility, HostShip.PilotInfo.PilotName, "After you defend, you may spend 1 Calculate token to perform an action", HostShip ); }