mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
Trove of Temptation working for Human.
This commit is contained in:
parent
24c2c69a81
commit
5996aa12e6
8 changed files with 45 additions and 38 deletions
|
|
@ -27,6 +27,9 @@
|
|||
*/
|
||||
package mage.game.permanent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -37,10 +40,6 @@ import mage.game.Controllable;
|
|||
import mage.game.Game;
|
||||
import mage.game.GameState;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface Permanent extends Card, Controllable {
|
||||
|
||||
void setControllerId(UUID controllerId);
|
||||
|
|
@ -223,16 +222,24 @@ public interface Permanent extends Card, Controllable {
|
|||
*/
|
||||
void setMaxBlockedBy(int maxBlockedBy);
|
||||
|
||||
boolean canAttack(Game game);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param defenderId id of planeswalker or player to attack
|
||||
* @param defenderId id of planeswalker or player to attack - can be empty
|
||||
* to check generally
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
boolean canAttack(UUID defenderId, Game game);
|
||||
|
||||
/**
|
||||
* Checks if a creature can attack (also if it is tapped)
|
||||
*
|
||||
* @param defenderId
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
boolean canAttackInPrinciple(UUID defenderId, Game game);
|
||||
|
||||
boolean canBlock(UUID attackerId, Game game);
|
||||
|
||||
boolean canBlockAny(Game game);
|
||||
|
|
|
|||
|
|
@ -1029,16 +1029,16 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
return game.replaceEvent(GameEvent.getEvent(eventType, this.objectId, ownerId));// controllerId seems to me more logical (LevelX2)
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(Game game) {
|
||||
return canAttack(null, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(UUID defenderId, Game game) {
|
||||
if (tapped) {
|
||||
return false;
|
||||
}
|
||||
return canAttackInPrinciple(defenderId, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttackInPrinciple(UUID defenderId, Game game) {
|
||||
if (hasSummoningSickness() && !game.getContinuousEffects().asThough(this.objectId, AsThoughEffectType.ATTACK_AS_HASTE, this.getControllerId(), game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue