mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Goad abilities - fixed missing text;
This commit is contained in:
parent
b0e2536243
commit
cdf7f6df6c
2 changed files with 12 additions and 7 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -11,14 +10,13 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GoadAllEffect extends OneShotEffect {
|
||||
|
||||
public GoadAllEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Goad all creatures you don't control.";
|
||||
staticText = "Goad all creatures you don't control. <i>(Until your next turn, those creatures attack each combat if able and attack a player other than you if able.)</i>";
|
||||
}
|
||||
|
||||
public GoadAllEffect(final GoadAllEffect effect) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -12,20 +11,20 @@ import mage.players.Player;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GoadTargetEffect extends OneShotEffect {
|
||||
|
||||
/**
|
||||
* 701.36. Goad
|
||||
*
|
||||
* <p>
|
||||
* 701.36a Certain spells and abilities can goad a creature. Until the next
|
||||
* turn of the controller of that spell or ability, that creature attacks
|
||||
* each combat if able and attacks a player other than that player if able.
|
||||
*/
|
||||
public GoadTargetEffect() {
|
||||
super(Outcome.Benefit);
|
||||
super(Outcome.Detriment);
|
||||
staticText = "you may goad target creature. <i>(Until your next turn, that creature attacks each combat if able and attacks a player other than you if able.)</i>";
|
||||
}
|
||||
|
||||
public GoadTargetEffect(final GoadTargetEffect effect) {
|
||||
|
@ -42,6 +41,14 @@ public class GoadTargetEffect extends OneShotEffect {
|
|||
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (targetCreature != null && controller != null) {
|
||||
// TODO: impoves goad to allows to target controller, current AttacksIfAbleTargetEffect is not support it
|
||||
// https://github.com/magefree/mage/issues/5283
|
||||
/*
|
||||
If the creature doesn’t meet any of the above exceptions and can attack, it must attack a player other than
|
||||
the controller of the spell or ability that goaded it if able. It the creature can’t attack any of those
|
||||
players but could otherwise attack, it must attack an opposing planeswalker (controlled by any opponent)
|
||||
or the player that goaded it. (2016-08-23)
|
||||
*/
|
||||
ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn);
|
||||
effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source)));
|
||||
game.addEffect(effect, source);
|
||||
|
|
Loading…
Reference in a new issue