mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
* Goaded creatures able to attack the goading player (in multiplayer) (fixes #3891).
* Grenzo, Havoc Raiser - Fixed trigger handling and null pointer exception.
This commit is contained in:
parent
c6543a89ff
commit
ea4af25c77
2 changed files with 21 additions and 14 deletions
|
|
@ -41,6 +41,13 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class GoadTargetEffect extends OneShotEffect {
|
||||
|
||||
/**
|
||||
* 701.36. Goad
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
|
@ -57,11 +64,11 @@ public class GoadTargetEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn);
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||
effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source)));
|
||||
game.addEffect(effect, source);
|
||||
effect = new CantAttackYouEffect(Duration.EndOfTurn, true);
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||
effect = new CantAttackYouEffect(Duration.UntilYourNextTurn, true);
|
||||
effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source)));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue