private void CheckR7AstromechAbility(Ship.GenericShip ship) { if (!usedThisRound) { ActionsList.GenericAction newAction = new ActionsList.R7AstromechActionEffect(this) { ImageUrl = HostUpgrade.ImageUrl, HostShip = HostShip }; HostShip.AddAvailableDiceModificationOwn(newAction); } }
private void AskToPerformAbilityAction() { HostShip.AskPerformFreeAction( new List <GenericAction>() { new TargetLockAction(), new BarrelRollAction() }, Triggers.FinishTrigger, "Fine-Tuned Thrusters" ); }
private void RegisterOutlawTechAbility(GenericShip ship) { if (BoardTools.Board.IsOffTheBoard(ship)) { return; } if (HostShip.GetLastManeuverColor() == Movement.MovementComplexity.Complex) { RegisterAbilityTrigger(TriggerTypes.OnMovementFinish, AskAssignFocusToken); } }
private void PerformFreeAction(object sender, System.EventArgs e) { var previousSelectedShip = Selection.ThisShip; Selection.ThisShip = HostShip; HostShip.AskPerformFreeAction(HostShip.GetAvailableActions(), delegate { Selection.ThisShip = previousSelectedShip; Triggers.FinishTrigger(); }); }
private void AskPerformBoostAction(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( new BoostAction() { Color = ActionColor.Red }, Triggers.FinishTrigger, descriptionShort: Name, descriptionLong: "After you perform an action, you may perform a red Boost action" ); }
public override void ActivateAbility() { HostShip.ChangeAgilityBy(1); if (RuleSet.Instance is FirstEdition) { HostShip.OnAttackHitAsDefender += RegisterStealthDeviceCleanup; } else { HostShip.OnDamageWasSuccessfullyDealt += RegisterStealthDeviceCleanupSe; } }
private void SpendCharge(Action <bool> callback) { if (HostShip.State.Charges > 0) { HostShip.SpendCharge(); callback(true); } else { callback(false); } }
public override void ActionEffect(Action callBack) { HostShip.AddAlreadyUsedDiceModification(new FinnTransportPodDiceModificationFocus() { HostShip = HostShip }); Combat.CurrentDiceRoll.AddDice(DieSide.Blank).ShowWithoutRoll(); Combat.CurrentDiceRoll.OrganizeDicePositions(); callBack(); }
private void AskPerformFreeActions(object sender, System.EventArgs e) { Sounds.PlayShipSound("Astromech-Beeping-and-whistling"); HostShip.AskPerformFreeAction( new List <GenericAction>() { new BoostAction(), new BarrelRollAction() }, Triggers.FinishTrigger); }
private void BB8AskBarrelRoll(object sender, EventArgs e) { Sounds.PlayShipSound("BB-8-Sound"); HostShip.AskPerformFreeAction( new List <GenericAction>() { new BarrelRollAction() }, Triggers.FinishTrigger ); }
private void ActivateBiggsAbility(object sender, System.EventArgs e) { IsAbilityUsed = true; HostShip.AssignToken(new Conditions.BiggsDarklighterCondition(), delegate { }); GenericShip.OnTryPerformAttackGlobal += CanPerformAttack; HostShip.OnDestroyed += RemoveBiggsDarklighterAbility; Phases.OnCombatPhaseEnd += RemoveBiggsDarklighterAbility; SubPhases.DecisionSubPhase.ConfirmDecision(); }
private void CheckPilotAbility() { bool IsDifferentPlayer = (HostShip.Owner.PlayerNo != Combat.Attacker.Owner.PlayerNo); bool HasFocusTokens = HostShip.HasToken(typeof(Tokens.FocusToken)); Board.ShipDistanceInformation distanceInfo = new Board.ShipDistanceInformation(HostShip, Combat.Attacker); if (IsDifferentPlayer && HasFocusTokens && distanceInfo.Range < 3) { RegisterAbilityTrigger(TriggerTypes.OnAttackStart, AskDecreaseAttack); } }
private void ActivateComposure(object sender, System.EventArgs e) { if (!HostShip.Tokens.HasTokenByColor(TokenColors.Green)) { Messages.ShowInfo(HostUpgrade.UpgradeInfo.Name + ": You may perform a Focus action"); HostShip.AskPerformFreeAction(new FocusAction(), Triggers.FinishTrigger); } else { Triggers.FinishTrigger(); } }
private void CheckAbility(List <ManeuverTemplate> availableTemplates, GenericUpgrade upgrade) { List <ManeuverTemplate> dropTemplates = HostShip.GetAvailableBombDropTemplates(upgrade); foreach (ManeuverTemplate template in dropTemplates) { if (!availableTemplates.Any(n => n.Name == template.Name)) { availableTemplates.Add(template); } } }
private void AskToPerformBoost(object sender, System.EventArgs e) { Messages.ShowInfoToHuman(HostUpgrade.UpgradeInfo.Name + ": You may perform a red Boost action"); HostShip.AskPerformFreeAction( new BoostAction() { IsRed = true }, Triggers.FinishTrigger ); }
public override void ActionEffect(Action callBack) { HostShip.AddAlreadyUsedDiceModification(new FinnTransportPodDiceModificationBlank() { HostShip = HostShip }); Combat.CurrentDiceRoll.AddDice(DieSide.Focus).ShowWithoutRoll(); Combat.CurrentDiceRoll.OrganizeDicePositions(); HostShip.Tokens.AssignToken(typeof(Tokens.StrainToken), callBack); }
public override void ActivateAbility() { HostShip.ChangeFirepowerBy(1); HostShip.ShipBaseArcsType = Arcs.BaseArcsType.ArcMobile; //This seems to work, but still prompt the user twice at the beginning HostShip.InitializeShipBaseArc(); HostShip.SetShipInsertImage(); HostShip.AfterGotNumberOfAttackDice += CheckWeakArc; HostShip.BeforeRemovingTokenInEndPhase += KeepTwoFocusTokens; Phases.Events.OnEndPhaseStart_NoTriggers += OnEndPhaseStart_NoTriggers; }
private void ProposeFreeEvadeAction(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( new EvadeAction() { HostShip = HostShip }, Triggers.FinishTrigger, descriptionShort: Name, descriptionLong: "After you decloak, you may perform an Evade action" ); }
private void BB8AskBarrelRoll(object sender, EventArgs e) { Sounds.PlayShipSound("BB-8-Sound"); HostShip.AskPerformFreeAction( new BarrelRollAction(), Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "When you reveal a green maneuver, you may perform a free Barrel Roll action.", HostUpgrade ); }
private void UsePatternAnalyzer(object sender, System.EventArgs e) { List <GenericAction> actions = Selection.ThisShip.GetAvailableActions(); HostShip.AskPerformFreeAction( actions, Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "While you fully execute a red maneuver, before the Check Difficulty step, you may perform 1 action", HostUpgrade ); }
private void AskPerformBoostAction(object sender, System.EventArgs e) { Messages.ShowInfoToHuman("Vectored Thrusters: you may perform a red boost action"); HostShip.AskPerformFreeAction( new BoostAction() { IsRed = true }, Triggers.FinishTrigger ); }
private void DeathfireEffect(object sender, EventArgs e) { var actions = HostShip.GetAvailableActions() .Where(action => action is BombDropAction) .ToList(); HostShip.AskPerformFreeAction(actions, () => { ClearIsAbilityUsedFlag(); Triggers.FinishTrigger(); }); }
private void RegisterTargetingAstromech(GenericShip hostShip) { if (HostShip.GetLastManeuverColor() != Movement.MovementComplexity.Complex) { return; } if (Board.IsOffTheBoard(hostShip)) { return; } RegisterAbilityTrigger(TriggerTypes.OnMovementFinish, AssignAstromechTargetingLock); }
private void RegenShield(object sender, EventArgs e) { HostUpgrade.State.SpendCharge(); HostShip.Tokens.AssignToken(typeof(WeaponsDisabledToken), () => { if (HostShip.TryRegenShields()) { Sounds.PlayShipSound("R2D2-Proud"); Messages.ShowInfo(HostName + " causes " + HostShip.PilotInfo.PilotName + " to recover 1 shield and gain 1 disarm token"); } Triggers.FinishTrigger(); }); }
private void AskToUseLeevanTenzaAbility(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( new EvadeAction() { Color = ActionColor.Red }, Triggers.FinishTrigger, HostShip.PilotInfo.PilotName, "After you perform a Barrel Roll or Boost action, you may perform a red Evade action.", HostShip ); }
protected virtual bool CheckAbility() { if (HostShip.GetLastManeuverColor() != Movement.MovementComplexity.Complex) { return(false); } if (BoardTools.Board.IsOffTheBoard(HostShip)) { return(false); } return(true); }
private void UseAbility(object sender, System.EventArgs e) { HostShip.AskPerformFreeAction( new FocusAction() { Color = ActionColor.Red }, Triggers.FinishTrigger, HostUpgrade.UpgradeInfo.Name, "Before you engage, you may perform a red Focus action.", HostUpgrade ); }
private void AskToPerformCoordinate(object sender, System.EventArgs e) { Messages.ShowInfo("\"Vizier\" can perform a Coordinate action"); RestrictedAbilityIsActivated = true; HostShip.OnActionIsPerformed += CheckActionRestriction; HostShip.OnMovementStart += ClearRestrictedAbility; HostShip.AskPerformFreeAction(new CoordinateAction() { Host = HostShip }, Triggers.FinishTrigger); }
private void AcquireSecondTargetLock(object sender, System.EventArgs e) { IsAbilityUsed = true; HostShip.ChooseTargetToAcquireTargetLock( delegate { IsAbilityUsed = false; Triggers.FinishTrigger(); }, "You may acquare a lock", HostUpgrade.ImageUrl ); }
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(); } }