mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
* Jango Fett - fixed wrong damage ability instead boost;
This commit is contained in:
parent
7140a41445
commit
ae5cdad951
1 changed files with 8 additions and 27 deletions
|
|
@ -1,37 +1,30 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.filter.predicate.permanent.CounterPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo/spjspj
|
||||
*/
|
||||
public final class JangoFett extends CardImpl {
|
||||
|
|
@ -55,7 +48,7 @@ public final class JangoFett extends CardImpl {
|
|||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever Jango Fett attacks, it deals X damage to defending player and target creature he or she controls, where X is the number of creatures defending player controls with a bounty counter on them.
|
||||
// Whenever Jango Fett attacks, it gets +X/+0, where X is the number of creatures defending player controls with a bounty counter on them
|
||||
this.addAbility(new JangoFettTriggeredAbility(new JangoFettEffect(), false));
|
||||
}
|
||||
|
||||
|
|
@ -97,11 +90,6 @@ class JangoFettTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
UUID defenderId = game.getCombat().getDefendingPlayerId(getSourceId(), game);
|
||||
if (defenderId != null) {
|
||||
this.getTargets().clear();
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature defending player controls");
|
||||
filter.add(new ControllerIdPredicate(defenderId));
|
||||
TargetPermanent target = new TargetPermanent(filter);
|
||||
this.addTarget(target);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -125,8 +113,8 @@ class JangoFettTriggeredAbility extends TriggeredAbilityImpl {
|
|||
class JangoFettEffect extends OneShotEffect {
|
||||
|
||||
public JangoFettEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "it deals X damage to defending player and target creature he or she controls, where X is the number of creatures defending player controls with a bounty counter on them";
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "it gets +X/+0, where X is the number of creatures defending player controls with a bounty counter on them";
|
||||
}
|
||||
|
||||
public JangoFettEffect(final JangoFettEffect ability) {
|
||||
|
|
@ -158,14 +146,7 @@ class JangoFettEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||
if (targetCreature != null) {
|
||||
targetCreature.damage(count, source.getSourceId(), game, false, true);
|
||||
}
|
||||
Player defender = game.getPlayer(defenderId);
|
||||
defender.damage(count, source.getSourceId(), game, false, true);
|
||||
|
||||
game.addEffect(new BoostSourceEffect(count, 0, Duration.WhileOnBattlefield), source);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue