forked from External/mage
[M20] added Thunderkin Awakener
This commit is contained in:
parent
606c0ae61a
commit
46d030d37a
4 changed files with 181 additions and 17 deletions
|
|
@ -1,14 +1,17 @@
|
|||
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class InfoEffect extends OneShotEffect {
|
||||
|
|
@ -32,4 +35,11 @@ public class InfoEffect extends OneShotEffect {
|
|||
return new InfoEffect(this);
|
||||
}
|
||||
|
||||
public static void addInfoToPermanent(Game game, Ability source, Permanent permanent, String info) {
|
||||
// add simple static info to permanent's rules
|
||||
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect(info));
|
||||
GainAbilityTargetEffect gainAbilityEffect = new GainAbilityTargetEffect(ability, Duration.WhileOnBattlefield);
|
||||
gainAbilityEffect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
game.addEffect(gainAbilityEffect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue