Redemptor Dreadnought + some fixes (#1578)

* Redemptor Dreadnought

* Cleanup

* Fix Moorland Rescuer

* Fix AttachedTo returning players for valid card params

* Fix cost

* Fixes

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
tool4ever
2022-09-24 06:06:43 +02:00
committed by GitHub
parent e9e5303710
commit 84589e06c5
22 changed files with 52 additions and 48 deletions

View File

@@ -278,7 +278,7 @@ public class ChangeZoneAllAi extends SpellAbilityAi {
}
if (destination.equals(ZoneType.Battlefield)) {
if (sa.getParam("GainControl") != null) {
if (sa.hasParam("GainControl")) {
// Check if the cards are valuable enough
if (CardLists.getNotType(oppType, "Creature").size() == 0
&& CardLists.getNotType(computerType, "Creature").size() == 0) {

View File

@@ -25,6 +25,7 @@ import forge.ai.SpecialCardAi;
import forge.ai.SpellAbilityAi;
import forge.card.mana.ManaCost;
import forge.game.Game;
import forge.game.GameEntity;
import forge.game.GameObject;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
@@ -805,11 +806,11 @@ public class DamageDealAi extends DamageAiBase {
*/
private boolean damageChooseNontargeted(Player ai, final SpellAbility saMe, final int dmg) {
// TODO: Improve circumstances where the Defined Damage is unwanted
final List<GameObject> objects = AbilityUtils.getDefinedObjects(saMe.getHostCard(), saMe.getParam("Defined"), saMe);
final List<GameEntity> objects = AbilityUtils.getDefinedEntities(saMe.getHostCard(), saMe.getParam("Defined"), saMe);
boolean urgent = false; // can it wait?
boolean positive = false;
for (final Object o : objects) {
for (final GameEntity o : objects) {
if (o instanceof Card) {
Card c = (Card) o;
final int restDamage = ComputerUtilCombat.predictDamageTo(c, dmg, saMe.getHostCard(), false);