mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
implement [LCI] Kutzil, Malamet Exemplar
This commit is contained in:
parent
87a313e89c
commit
4a250c48a5
7 changed files with 137 additions and 88 deletions
|
|
@ -0,0 +1,42 @@
|
|||
package mage.abilities.effects.common.ruleModifying;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public class CantCastDuringYourTurnEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
/**
|
||||
* "Your opponents can't cast spells during your turn."
|
||||
*/
|
||||
public CantCastDuringYourTurnEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Your opponents can't cast spells during your turn";
|
||||
}
|
||||
|
||||
protected CantCastDuringYourTurnEffect(final CantCastDuringYourTurnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CantCastDuringYourTurnEffect copy() {
|
||||
return new CantCastDuringYourTurnEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return game.isActivePlayer(source.getControllerId()) &&
|
||||
game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public enum PowerGreaterThanBasePowerPredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
MageInt power = input.getPower();
|
||||
return power.getValue() > power.getModifiedBaseValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "power greater than its base power";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue