static public async Task ActAsync(TargetSpiritCtx ctx) { // You and other spirit share presence for targeting if (ctx.Self != ctx.Other) { ctx.GameState.TimePasses_ThisRound.Push(new SourceCalcRestorer(ctx.Self).Restore); ctx.GameState.TimePasses_ThisRound.Push(new SourceCalcRestorer(ctx.Other).Restore); _ = new EntwinedPresenceSource(ctx.Self, ctx.Other); // auto-binds to spirits } // Target spirit gains a power Card. var result = await ctx.OtherCtx.Draw(); // You gain one of the power Cards they did not keep. await DrawFromDeck.TakeCard(ctx.Self, result.Rejected.ToList()); // if you have 2 water, 4 plant, if (await ctx.YouHave("2 water,4 plant")) { // you and target spirit each gain 3 energy ctx.Self.Energy += 3; ctx.Other.Energy += 3; // may gift the other 1 power from hand. await GiftCardToSpirit(ctx.Self, ctx.Other); await GiftCardToSpirit(ctx.Other, ctx.Self); } }
static public async Task Act(TargetSpiritCtx ctx) { // If dahan are pushed to your ocean, you may move them to any costal land instead of drowning them. ctx.GameState.Tokens.TokenMoved.ForRound.Add(PushDahanOutOfOcean); async Task PushDahanOutOfOcean(TokenMovedArgs args) { if (args.Token.Class != TokenType.Dahan) { return; } if (!args.AddedTo.IsOcean) { return; } await ctx.Target(args.AddedTo).PushUpToNDahan(args.Count); } // target spirit gains 2 energy ctx.Other.Energy += 2; // and may push 1 town and up to 2 dahan from one of their lands. var pushLand = await ctx.OtherCtx.TargetLandWithPresence("Select land to push town and 2 dahan"); await pushLand .Pusher .AddGroup(1, Invader.Town) .AddGroup(2, TokenType.Dahan) .MoveUpToN(); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // gain 3 energy. ctx.Self.Energy += 3; // if card is traded to someone else, don't crash if (ctx.Self.Presence is not SerpentPresence serpentPresence) { return; } if (6 <= serpentPresence.AbsorbedPresences.Count) { return; } // move 1 of target spirit's presence from the board to your 'Deep Slumber' track. // Absorbed presence cannot be returned to play. var space = await ctx.OtherCtx.Presence.SelectDeployed("Select presence to be absorbed"); await ctx.OtherCtx.Presence.RemoveFrom(space); serpentPresence.AbsorbedPresences.Add(ctx.Other); // Target spirit gains 1 ANY and 1 energy ctx.Other.Energy += 1; ctx.Other.Elements[Element.Any]++; // !!! ??? When are ANY converted? Should spirit do that now instead of adding an ANY element? }
static public async Task ActAsync(TargetSpiritCtx ctx) { // if you target yourself if (ctx.Other == ctx.Self) { // Draw minor await ctx.DrawMinor(); return; } // Otherwise: Target Spirit gains a Power Card. var powerType = await DrawFromDeck.SelectPowerCardType(ctx.Self); if (powerType == PowerType.Minor) { await ctx.OtherCtx.DrawMinor(); } else { await ctx.OtherCtx.DrawMajor(false, 4); // If it's a Major Power, they may pay 2 Energy instead of Forgetting a Power Card. if (ctx.Other.Energy >= 2 && await ctx.Other.UserSelectsFirstText("Pay for Major Card", "2 energy", "forget a card")) { ctx.Other.Energy -= 2; } else { await ctx.Other.ForgetPowerCard_UserChoice(); } } }
static public async Task ActAsync(TargetSpiritCtx ctx) { if (ctx.Other.Presence.Destroyed == 0) { return; } // into a single land, up to range 2 from your presence. // Note - Jonah says it is the originators power and range and decision, not the targets var spaceOptions = ctx.Self.GetTargetOptions(TargettingFrom.None, ctx.GameState, new TargetSourceCriteria(From.Presence), new TargetCriteria(2, Target.Any)) .Where(ctx.Other.Presence.IsValid) .ToArray(); TargetSpaceCtx selfPickLandCtx = await ctx.SelectSpace("Select location for target spirit to add presence", spaceOptions); // target spirit adds 2 of their destroyed presence await ctx.OtherCtx .Target(selfPickLandCtx.Space) .Presence.PlaceDestroyedHere(2); // if any presene was added, 2 damage to each town/city in that land. await selfPickLandCtx.DamageEachInvader(2, Invader.Town, Invader.City); // if you have 3 fire, 3 earth , 2 plant, 4 damage in that land if (await ctx.YouHave("3 fire,3 earth,2 plant")) { await selfPickLandCtx.DamageInvaders(4); } }
static public Task Act(TargetSpiritCtx ctx) { // target spirit gets +2 range with all their Powers ctx.GameState.TimePasses_ThisRound.Push(new PowerApiRestorer(ctx.Other).Restore); ctx.Other.RangeCalc = new TargetLandApi_ExtendRange(2, ctx.Other.RangeCalc); return(Task.CompletedTask); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // destroy one of your presence await ctx.Presence.DestroyOne(DestoryPresenceCause.SpiritPower); // If 2 sun, do both in the same land await TargetSpiritAction(ctx.OtherCtx, await ctx.YouHave("2 sun")); }
static public Task ActAsync(TargetSpiritCtx ctx) { // Target spirit may use up to 2 slow powers as if they were fast powers this turn. ctx.Other.AddActionFactory(new ResolveSlowDuringFast()); ctx.Other.AddActionFactory(new ResolveSlowDuringFast()); return(Task.CompletedTask); }
static public async Task Option1(TargetSpiritCtx ctx) { // Turn any face-down fear card face-up PositionFearCard[] cards = ctx.GameState.Fear.Deck.Concat(ctx.GameState.Fear.ActivatedCards).ToArray(); var cardToShow = await ctx.Self.Select("Select fear to reveal", cards, Present.Always); await ctx.Self.ShowFearCardToUser("Done", cardToShow); }
static public async Task Option2(TargetSpiritCtx ctx) { // Target spirit gains an element they have at least 1 of Element el = (await ctx.Other.SelectElementsEx(1, ctx.Other.Elements.Keys.ToArray())).FirstOrDefault(); if (el != default) { ++ctx.Other.Elements[el]; } }
static public async Task ActAsync(TargetSpiritCtx ctx) { // for the rest of this turn, each of target Spirit's presence grants Defend 1 in its land. int PresenceAsToken(GameState _, Space space) => ctx.Self.Presence.CountOn(space); ctx.GameState.Tokens.RegisterDynamic(PresenceAsToken, TokenType.Defend, false); // Target Spirit may Push up to 1 of their presence. await ctx.OtherCtx.Presence.PushUpTo1(); }
static public Task ActAsync(TargetSpiritCtx ctx) { // target spirit chooses to either: return(ctx.OtherCtx.SelectActionOption( // Add 1 wilds to one of their lands new SelfAction("Add 1 wilds to one of your lands", Add1WildsToOneOfYourLands), // Replace 1 of their presence with 1 disease. new SelfAction("Replace 1 of your presence with 1 disease", Replace1PresenceWith1Disease) )); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // Target spirit gathers 1 dahan into one of their lands var spaceCtx = await ctx.OtherCtx.TargetLandWithPresence("Gather 1 dahan to"); await spaceCtx.GatherUpToNDahan(1); // 1 damage in that land per dahan present await spaceCtx.DamageInvaders(spaceCtx.Dahan.Count); }
static public Task ActAsync(TargetSpiritCtx ctx) { // Once this turn, target spirit may repeat the lowest-cost Power Card they have in play by paying its cost again. ctx.Other.AddActionFactory(new RepeatCheapestCardForCost(Name)); // You may do likewise. ctx.Self.AddActionFactory(new RepeatCheapestCardForCost(Name)); // !!! Must EXCLUDE Gift of Twinned Days return(Task.CompletedTask); }
static public async Task Act(TargetSpiritCtx ctx) { // Target Spirit gains 3 _different_ Elements of their choice Element[] elements = await Gain3DifferentElements(ctx.Other); // if you target another spirit, you also gain the chosen elements if (ctx.Other != ctx.Self) { ctx.Self.Elements.AddRange(elements); } }
static public async Task ActAsync(TargetSpiritCtx ctx) { // target Spirit gains a major power by drawing 2 and keeping 1, without having to forget another power card PowerCard card = (await ctx.OtherCtx.DrawMajor(false, 2)).Selected; // if 2 of each element, if (await ctx.YouHave("2 sun,2 moon,2 fire,2 air,2 water,2 earth,2 plant,2 animal")) { await PlayCardByPayingHalfCostOrForgetting(card, ctx.OtherCtx); } }
static public async Task ActAsync(TargetSpiritCtx ctx) { // target spirit gains a power card await ctx.Other.Draw(ctx.GameState); // if you target another spirit, they also gain 1 energy if (ctx.Other != ctx.Self) { ++ctx.Other.Energy; } }
static public Task ActAsync(TargetSpiritCtx ctx) { // this turn, target spirit may use 1 slow power as if it were fast or vice versa ctx.Other.AddActionFactory(new ResolveSlowDuringFast_OrViseVersa()); // Target Spirit gains +3 range for targeting costal lands only ctx.GameState.TimePasses_ThisRound.Push(new PowerApiRestorer(ctx.Other).Restore); _ = new SkyStretchesToShoreApi(ctx.Other); // Auto-binds to spirit return(Task.CompletedTask); }
static public Task ActionAsync(TargetSpiritCtx ctx) { if (ctx.Self == ctx.Other) { ctx.Self.Energy++; } else { ctx.Other.Energy += ctx.Other.InPlay.Count; } return(Task.CompletedTask); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // If you target a spirit other than yourself, they gain +1 energy if (ctx.Other != ctx.Self) { ctx.Other.Energy++; } // target spirit may immediately play another power Card by paying its cost. // if it is slow, it does not resolve until later await ctx.Other.SelectAndPlayCardsFromHand(1); }
public static Task ActAsync(TargetSpiritCtx ctx) { // Target spirit gains 1 energy. ctx.Other.Energy += 1; // Target spirit chooses to either: return(ctx.OtherCtx.SelectActionOption( // Play another Power Card by paying its cost new SelfAction("Play another Power Card by paying its cost", _ => { ctx.Other.AddActionFactory(new PlayCardForCost()); }), // OR Gains 1 fire and 1 water. new SelfAction("Gain 1 fire and 1 water", _ => { var els = ctx.Other.Elements; els[Element.Fire]++; els[Element.Water]++; }) )); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // Add 1 beast in one of target spirits lands var spaceCtx = await ctx.OtherCtx.TargetLandWithPresence("Select land to add beast (+defend 4 for SS)"); await spaceCtx.Beasts.Add(1); // if target spirit has a SS in that land, defend 4 there if (spaceCtx.IsSelfSacredSite) { spaceCtx.Defend(4); } }
public static async Task ActAsync(TargetSpiritCtx ctx) { var otherCtx = ctx.OtherCtx; // target spirit gains a minor power. var powerCard = (await otherCtx.DrawMinor()).Selected; // Target spirit chooses to either: await otherCtx.SelectActionOption( new SelfAction( "Play it immediately by paying its cost", x => x.Self.PlayCard(powerCard)) .FilterOption(powerCard.Cost <= otherCtx.Self.Energy), new SelfAction( "Gains 1 moon and 1 earth", _ => { var els = otherCtx.Self.Elements; els[Element.Moon]++; els[Element.Earth]++; } ) ); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // Target Spirit gains either 2 Energy or 2 of a single Element (their choice). await ctx.OtherCtx.SelectActionOption( new SelfAction("Gain 2 energy", ctx => ctx.Self.Energy += 2), new SelfAction("Gain 2 of a single element", ctx => GainEl(ctx, 2)) ); // if you target another Spirit, you gain an Element of your choice. if (ctx.Self != ctx.Other) { await GainEl(ctx, 1); } }
public static Task ActAsync(TargetSpiritCtx ctx) { // Split 1 Energy per fire you have between yourself and target Spirit, as evenly as possible. int fireCount = ctx.Self.Elements[Element.Fire]; int energyForSelf = fireCount / 2; // will round down int energyForOther = fireCount - energyForSelf; ctx.Self.Energy += energyForSelf; ctx.Other.Energy += energyForOther; // Target Spirit gains +1 range with their Powers that originate from a Mountain ExtendRangeFromMountains(ctx.OtherCtx); return(Task.CompletedTask); }
static public Task ActAsync(TargetSpiritCtx ctx) { // Target Spirit gains 1 energy. ++ctx.Other.Energy; // Target Spirit does +1 damage for each damage-dealing power ++ctx.Other.BonusDamage; ctx.GameState.TimePasses_ThisRound.Push((gs) => { --ctx.Other.BonusDamage; return(Task.CompletedTask); }); return(Task.CompletedTask); }
static public Task Act(TargetSpiritCtx ctx) { // defend 2 in every land where spirit has presence // defend should move with presence // https://querki.net/u/darker/spirit-island-faq/#!.7w4ganu ctx.GameState.Tokens.RegisterDynamic( (gs, space) => ctx.Other.Presence.IsOn(space) ? 2 : 0, TokenType.Defend, false ); // !! this didn't display, is something wrong? return(Task.CompletedTask); }
static public async Task Act(TargetSpiritCtx ctx) { // 2 fear ctx.AddFear(2); // target spirit may push 1 explorer and 1 town from land where it has presence // Select Land var pushLand = await ctx.OtherCtx.TargetLandWithPresence("Select land to push 1 exploer & 1 town from"); // Push Town / Explorer await pushLand.Pusher .AddGroup(1, Invader.Town) .AddGroup(1, Invader.Explorer) .MoveUpToN(); }
static public Task ActAsync(TargetSpiritCtx ctx) { // target spirit gains 2 energy. ctx.Other.Energy += 2; // At end of turn, target spirit may reclaim 1 power card instead of discarding it. var purchased = ctx.Other.InPlay; ctx.GameState.TimePasses_ThisRound.Push(new Reclaim1InsteadOfDiscard(ctx.Other).Reclaim); // if you target another spirit you may also reclaim 1 power Card instead of discarding it. if (ctx.Other != ctx.Self) { ctx.GameState.TimePasses_ThisRound.Push(new Reclaim1InsteadOfDiscard(ctx.Self).Reclaim); } return(Task.CompletedTask); }
static public async Task ActAsync(TargetSpiritCtx ctx) { // Choose a land where you and target Spirit both have presence. var spaceOptions = ctx.Self.Presence.Spaces.Intersect(ctx.Other.Presence.Spaces); var space = await ctx.Decision(new Select.Space("", spaceOptions, Present.Always)); if (space == null) { return; } // In that land: Remove 1 blight var x = ctx.OtherCtx.Target(space); await x.RemoveBlight(); // and target Spirit may add 1 of their Destroyed presence. await x.Presence.PlaceDestroyedHere(); // ! "May" Add - let them choose }