mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
cleanup AbilityType for easier check that an ability is an activated ability (#12153)
* cleanup AbilityType * further cleanup * cleanup instanceof * tweak formatting * rework Rex * fix mistake in PlayerImpl * cleanup 'instanceof' for 'ActivatedManaAbilityImpl'
This commit is contained in:
parent
62cc49ffa3
commit
85cad4ff1e
118 changed files with 486 additions and 574 deletions
|
|
@ -12,7 +12,6 @@ import mage.abilities.keyword.*;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.choices.Choice;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.counters.CounterType;
|
||||
|
|
@ -1082,7 +1081,7 @@ public class ComputerPlayer6 extends ComputerPlayer {
|
|||
|
||||
private boolean checkForRepeatedAction(Game sim, SimulationNode2 node, Ability action, UUID playerId) {
|
||||
// pass or casting two times a spell multiple times on hand is ok
|
||||
if (action instanceof PassAbility || action instanceof SpellAbility || action.getAbilityType() == AbilityType.MANA) {
|
||||
if (action instanceof PassAbility || action instanceof SpellAbility || action.isManaAbility()) {
|
||||
return false;
|
||||
}
|
||||
int newVal = GameStateEvaluator2.evaluate(playerId, sim).getTotalScore();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.costs.mana.VariableManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.Combat;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -100,7 +99,7 @@ public final class SimulatedPlayer2 extends ComputerPlayer {
|
|||
List<ActivatedAbility> playables = game.getPlayer(playerId).getPlayable(game, isSimulatedPlayer);
|
||||
playables = filterAbilities(game, playables, suggested);
|
||||
for (ActivatedAbility ability : playables) {
|
||||
if (ability.getAbilityType() == AbilityType.MANA) {
|
||||
if (ability.isManaAbility()) {
|
||||
continue;
|
||||
}
|
||||
List<Ability> options = game.getPlayer(playerId).getPlayableOptions(ability, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue