mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -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
|
|
@ -280,9 +280,9 @@ public class CardPanelRenderModeImage extends CardPanel {
|
|||
|
||||
// Ability icon
|
||||
if (newGameCard.isAbility()) {
|
||||
if (newGameCard.getAbilityType() == AbilityType.TRIGGERED) {
|
||||
if (newGameCard.getAbilityType() == AbilityType.TRIGGERED_NONMANA) {
|
||||
setTypeIcon(ImageManagerImpl.instance.getTriggeredAbilityImage(), "Triggered Ability");
|
||||
} else if (newGameCard.getAbilityType() == AbilityType.ACTIVATED) {
|
||||
} else if (newGameCard.getAbilityType() == AbilityType.ACTIVATED_NONMANA) {
|
||||
setTypeIcon(ImageManagerImpl.instance.getActivatedAbilityImage(), "Activated Ability");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,9 +425,9 @@ public abstract class CardRenderer {
|
|||
// Get a string representing the type line
|
||||
protected String getCardTypeLine() {
|
||||
if (cardView.isAbility()) {
|
||||
if (cardView.getAbilityType() == AbilityType.TRIGGERED) {
|
||||
if (cardView.getAbilityType() == AbilityType.TRIGGERED_NONMANA) {
|
||||
return "Triggered Ability";
|
||||
} else if (cardView.getAbilityType() == AbilityType.ACTIVATED) {
|
||||
} else if (cardView.getAbilityType() == AbilityType.ACTIVATED_NONMANA) {
|
||||
return "Activated Ability";
|
||||
} else if (cardView.getAbilityType() == null) {
|
||||
// TODO: Triggered abilities waiting to be put onto the stack have abilityType = null. Figure out why
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue