mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Kurkesh, Onakke Ancient - Fixed possible null pointer exception.
This commit is contained in:
parent
7aa27a9800
commit
561d254b22
1 changed files with 10 additions and 10 deletions
|
@ -80,15 +80,15 @@ public class KurkeshOnakkeAncient extends CardImpl {
|
|||
}
|
||||
|
||||
class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
KurkeshOnakkeAncientTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new KurkeshOnakkeAncientEffect(), false);
|
||||
}
|
||||
|
||||
|
||||
KurkeshOnakkeAncientTriggeredAbility(final KurkeshOnakkeAncientTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public KurkeshOnakkeAncientTriggeredAbility copy() {
|
||||
return new KurkeshOnakkeAncientTriggeredAbility(this);
|
||||
|
@ -98,11 +98,11 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ACTIVATED_ABILITY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Card source = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
if (source.getCardType().contains(CardType.ARTIFACT)) {
|
||||
if (source != null && source.getCardType().contains(CardType.ARTIFACT)) {
|
||||
StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId());
|
||||
if (!(stackAbility.getStackAbility() instanceof ManaAbility)) {
|
||||
Effect effect = this.getEffects().get(0);
|
||||
|
@ -112,7 +112,7 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you activate an ability of an artifact, if it isn't a mana ability, you may pay {R}. If you do, copy that ability. You may choose new targets for the copy.";
|
||||
|
@ -120,21 +120,21 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
class KurkeshOnakkeAncientEffect extends OneShotEffect {
|
||||
|
||||
|
||||
KurkeshOnakkeAncientEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = ", you may pay {R}. If you do, copy that ability. You may choose new targets for the copy.";
|
||||
}
|
||||
|
||||
|
||||
KurkeshOnakkeAncientEffect(final KurkeshOnakkeAncientEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public KurkeshOnakkeAncientEffect copy() {
|
||||
return new KurkeshOnakkeAncientEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
|
|
Loading…
Reference in a new issue