mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Remove some unnecessary checks.
This commit is contained in:
parent
900d68f77d
commit
74b9f0eb24
3 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ class HeraldOfWarCostReductionEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
|
||||
if (abilityToModify instanceof SpellAbility) {
|
||||
Card sourceCard = game.getCard(abilityToModify.getSourceId());
|
||||
if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.hasSubtype("Angel", game) || sourceCard.hasSubtype("Human", game))) {
|
||||
return true;
|
||||
|
|
|
@ -94,7 +94,7 @@ class KaerveksTorchCostIncreaseEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
|
||||
if (abilityToModify instanceof SpellAbility) {
|
||||
for (UUID modeId : abilityToModify.getModes().getSelectedModes()) {
|
||||
Mode mode = abilityToModify.getModes().get(modeId);
|
||||
for (Target target : mode.getTargets()) {
|
||||
|
|
|
@ -89,7 +89,7 @@ class TrinisphereEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if ((abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility)) {
|
||||
if (abilityToModify instanceof SpellAbility) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
return permanent != null && !permanent.isTapped();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue