float calcActionValue(Response response, THHGame game, THHPlayer player, THHPlayer opponent) { float value = 0; if (response is UseResponse use) { Card card = game.getCard(use.cardId); Card target = use.targetsId.Length > 0 ? game.getCard(use.targetsId[0]) : null; value = card.getCost(game); if (card.define is LuckyCoin) { value = 1; } else if (card.define is SummerFire) { value = calcDamageValue(game, player, opponent, target, 1); } else if (card.define is AutumnEdge) { value = calcRandomDamageValue(game, player, opponent, opponent.field, 2); } else if (card.define is SpringWind) { value = calcBuffValue(game, player, opponent, target, 0, 2); } else if (card.define is WinterElement) { value = calcFreezeValue(game, player, opponent, target); } else if (card.define is SummerFire) { value = calcBuffValue(game, player, opponent, target, 2, 0); } else if (card.define is DoyouSpear) { value = calcServantValue(game, player, opponent, 1, 1); } else if (card.define is MultiCast) { value = player.hand.Where(c => c.isSpell() && c.getCost(game) > 1).Count() > 0 ? 2 : 0; } else if (card.define is TheGreatLibrary) { value = 1; } else if (card.define is BestMagic) { value = 5; } else if (card.define is ArcaneKnowledge) { value = 4; } else if (card.define is PhilosopherStone) { value = 2; } else if (card.define is MetalFatigue) { value = calcAOEDamageValue(game, player, opponent, opponent.field, 3); } else if (card.define is SylphyHorn) { value = calcBuffValue(game, player, opponent, target, 3, 6); } else if (card.define is PrincessUndine) { value = calcAOEDamageValue(game, player, opponent, player.field, 3); } else if (card.define is AgniShine) { value = calcDamageValue(game, player, opponent, target, 7); } else if (card.define is TrilithonShake) { value = calcServantValue(game, player, opponent, 3, 9); } else if (card.define is RoyalFlare) { value = calcDamageValue(game, player, opponent, opponent.master, 15); } else if (card.define is SilentSelene) { value = calcServantsValue(game, player, opponent, opponent.field); } else if (card.define is ElementalHarvester) { value = calcAOEDamageValue(game, player, opponent, opponent.field, 2); } else if (card.define is BurgeoningRise) { value = calcBuffValue(game, player, opponent, target, 3, 3) + (target.getOwner() == player ? calcServantValue(game, player, opponent, target) - 1 : 0); } else if (card.define is PhlogisticRain) { value = calcRandomDamageValue(game, player, opponent, opponent.field.Append(opponent.master), 1) * 6; } else if (card.define is StElmoPillar) { value = calcDamageValue(game, player, opponent, target, 6); } else if (card.define is NoachianDeluge) { value = calcServantValue(game, player, opponent, 2, 2) + 1; } else if (card.define is MercuryPoison) { value = calcAOEDamageValue(game, player, opponent, opponent.field, 3); } else if (card.define is ForestBlaze) { value = calcBuffAllValue(game, player, opponent, player.field, 2, 2) + calcRandomDamageValue(game, player, opponent, opponent.field, 1) * player.field.count; } else if (card.define is WaterElf) { value = calcBuffValue(game, player, opponent, target, 3, 6 + target.getLife(game) - target.getCurrentLife(game)) + 1; } else if (card.define is LavaCromlech) { value = (calcServantValue(game, player, opponent, 2, 2) + calcRandomDamageValue(game, player, opponent, opponent.field, 2)) * 3; } else if (card.define is GingerGust) { value = (calcServantValue(game, player, opponent, 3, 1) + 1) * opponent.field.count; } } return(value); }