public override async Task Battlecry(GameHandler gameHandler, int curPlayer, int enemy) { int chosenIndex = await PlayerInteraction.ChooseUpgradeInShopAsync(gameHandler, curPlayer, enemy); Upgrade chosen = gameHandler.players[curPlayer].shop.At(chosenIndex); chosen.Cost = 1; chosen.creatureData.health = 1; chosen.creatureData.health = 1; }
public override async Task Battlecry(GameHandler gameHandler, int curPlayer, int enemy) { int chosenIndex = await PlayerInteraction.ChooseUpgradeInShopAsync(gameHandler, curPlayer, enemy); if (chosenIndex == -1) { return; } int newCost = gameHandler.players[curPlayer].shop.At(chosenIndex).Cost - 1; List <Upgrade> pool = CardsFilter.FilterList <Upgrade>(gameHandler.players[curPlayer].pool.upgrades, x => x.Cost == newCost); if (pool.Count > 0) { Upgrade x = (Upgrade)(await PlayerInteraction.DiscoverACardAsync <Upgrade>(gameHandler, curPlayer, enemy, "Discover an Upgrade to replace with", pool, false)); gameHandler.players[curPlayer].shop.TransformUpgrade(chosenIndex, x); } }
public override async Task Call(Card caller, GameHandler gameHandler, ulong curPlayer, ulong enemy, ExtraEffectInfo extraInf) { int chosenIndex = await PlayerInteraction.ChooseUpgradeInShopAsync(gameHandler, curPlayer, enemy, extraInf.ctx); if (chosenIndex == -1) { return; } int newCost = gameHandler.players[curPlayer].shop.At(chosenIndex).Cost - 1; List <Upgrade> pool = CardsFilter.FilterList <Upgrade>(gameHandler.players[curPlayer].pool.upgrades, x => x.Cost == newCost); if (pool.Count > 0) { Upgrade x = (Upgrade)(await PlayerInteraction.DiscoverACardAsync <Upgrade>(gameHandler, curPlayer, enemy, extraInf.ctx, "Discover an Upgrade to replace with", pool, false)); gameHandler.players[curPlayer].shop.TransformUpgrade(chosenIndex, x); } }