mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
Some minor changes/renames.
This commit is contained in:
parent
fffbc526b1
commit
f37761fbc1
48 changed files with 102 additions and 108 deletions
|
|
@ -42,9 +42,9 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ReturnToHandTargetCost extends CostImpl {
|
||||
public class ReturnToHandTargetPermanentCost extends CostImpl {
|
||||
|
||||
public ReturnToHandTargetCost(TargetControlledPermanent target) {
|
||||
public ReturnToHandTargetPermanentCost(TargetControlledPermanent target) {
|
||||
this.addTarget(target);
|
||||
if (target.getMaxNumberOfTargets() > 1 && target.getMaxNumberOfTargets() == target.getNumberOfTargets()) {
|
||||
this.text = new StringBuilder("return ").append(target.getMaxNumberOfTargets()).append(" ").append(target.getTargetName()).append(" you control to it's owner's hand").toString();
|
||||
|
|
@ -53,7 +53,7 @@ public class ReturnToHandTargetCost extends CostImpl {
|
|||
}
|
||||
}
|
||||
|
||||
public ReturnToHandTargetCost(ReturnToHandTargetCost cost) {
|
||||
public ReturnToHandTargetPermanentCost(ReturnToHandTargetPermanentCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
|
|
@ -80,8 +80,8 @@ public class ReturnToHandTargetCost extends CostImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ReturnToHandTargetCost copy() {
|
||||
return new ReturnToHandTargetCost(this);
|
||||
public ReturnToHandTargetPermanentCost copy() {
|
||||
return new ReturnToHandTargetPermanentCost(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3,7 +3,6 @@ package mage.abilities.dynamicvalue.common;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
@ -11,12 +10,10 @@ import mage.game.permanent.Permanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class SourcePermanentPowerCount implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Permanent sourcePermanent = game.getPermanent(sourceAbility.getSourceId());
|
||||
if (sourcePermanent == null) {
|
||||
sourcePermanent = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
return sourcePermanent.getPower().getValue();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue