mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
Fixed spelling of CanAttackAsThoughItDidntHaveDefender. Added M2M2 and P1P0 counter types. Added "HintText" to other landwalks in addtion to swampwalk. Added 40 cards.
This commit is contained in:
parent
dc6dc07e47
commit
1f24f68a11
85 changed files with 5264 additions and 1050 deletions
|
|
@ -42,28 +42,28 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author Quercitron
|
||||
*/
|
||||
public class CanAttackAsThoughtItDidntHaveDefenderAllEffect extends AsThoughEffectImpl {
|
||||
public class CanAttackAsThoughItDidntHaveDefenderAllEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration duration) {
|
||||
public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration) {
|
||||
this(duration, new FilterCreaturePermanent());
|
||||
}
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration duration, FilterPermanent filter) {
|
||||
public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration, FilterPermanent filter) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
this.staticText = getText();
|
||||
}
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderAllEffect(final CanAttackAsThoughtItDidntHaveDefenderAllEffect effect) {
|
||||
public CanAttackAsThoughItDidntHaveDefenderAllEffect(final CanAttackAsThoughItDidntHaveDefenderAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanAttackAsThoughtItDidntHaveDefenderAllEffect copy() {
|
||||
return new CanAttackAsThoughtItDidntHaveDefenderAllEffect(this);
|
||||
public CanAttackAsThoughItDidntHaveDefenderAllEffect copy() {
|
||||
return new CanAttackAsThoughItDidntHaveDefenderAllEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -1,69 +1,69 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CanAttackAsThoughtItDidntHaveDefenderSourceEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration duration) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
staticText = "{this} can attack as though it didn't have defender";
|
||||
}
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(final CanAttackAsThoughtItDidntHaveDefenderSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanAttackAsThoughtItDidntHaveDefenderSourceEffect copy() {
|
||||
return new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return objectId.equals(source.getSourceId());
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CanAttackAsThoughItDidntHaveDefenderSourceEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration duration) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
staticText = "{this} can attack as though it didn't have defender";
|
||||
}
|
||||
|
||||
public CanAttackAsThoughItDidntHaveDefenderSourceEffect(final CanAttackAsThoughItDidntHaveDefenderSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanAttackAsThoughItDidntHaveDefenderSourceEffect copy() {
|
||||
return new CanAttackAsThoughItDidntHaveDefenderSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return objectId.equals(source.getSourceId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,84 +1,84 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CanAttackAsThoughtItDidntHaveDefenderTargetEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(Duration duration) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(final CanAttackAsThoughtItDidntHaveDefenderTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanAttackAsThoughtItDidntHaveDefenderTargetEffect copy() {
|
||||
return new CanAttackAsThoughtItDidntHaveDefenderTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return this.getTargetPointer().getTargets(game, source).contains(objectId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
if (!mode.getTargets().isEmpty()) {
|
||||
if (this.duration == Duration.EndOfTurn) {
|
||||
return "Target " + mode.getTargets().get(0).getTargetName() + " can attack this turn as though it didn't have defender";
|
||||
} else {
|
||||
return "Target " + mode.getTargets().get(0).getTargetName() + " can attack as though it didn't have defender";
|
||||
}
|
||||
} else {
|
||||
throw new UnsupportedOperationException("No target defined");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CanAttackAsThoughItDidntHaveDefenderTargetEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration duration) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public CanAttackAsThoughItDidntHaveDefenderTargetEffect(final CanAttackAsThoughItDidntHaveDefenderTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanAttackAsThoughItDidntHaveDefenderTargetEffect copy() {
|
||||
return new CanAttackAsThoughItDidntHaveDefenderTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return this.getTargetPointer().getTargets(game, source).contains(objectId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
if (!mode.getTargets().isEmpty()) {
|
||||
if (this.duration == Duration.EndOfTurn) {
|
||||
return "Target " + mode.getTargets().get(0).getTargetName() + " can attack this turn as though it didn't have defender";
|
||||
} else {
|
||||
return "Target " + mode.getTargets().get(0).getTargetName() + " can attack as though it didn't have defender";
|
||||
}
|
||||
} else {
|
||||
throw new UnsupportedOperationException("No target defined");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -43,7 +43,11 @@ public class ForestwalkAbility extends LandwalkAbility {
|
|||
}
|
||||
|
||||
public ForestwalkAbility() {
|
||||
super(filter);
|
||||
this(true);
|
||||
}
|
||||
|
||||
public ForestwalkAbility(boolean withHintText) {
|
||||
super(filter, withHintText);
|
||||
}
|
||||
|
||||
public ForestwalkAbility(final ForestwalkAbility ability) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ public class IslandwalkAbility extends LandwalkAbility {
|
|||
}
|
||||
|
||||
public IslandwalkAbility() {
|
||||
super(filter);
|
||||
this(true);
|
||||
}
|
||||
|
||||
public IslandwalkAbility(boolean withHintText) {
|
||||
super(filter, withHintText);
|
||||
}
|
||||
|
||||
public IslandwalkAbility(final IslandwalkAbility ability) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ public class MountainwalkAbility extends LandwalkAbility {
|
|||
}
|
||||
|
||||
public MountainwalkAbility() {
|
||||
super(filter);
|
||||
this(true);
|
||||
}
|
||||
|
||||
public MountainwalkAbility(boolean withHintText) {
|
||||
super(filter, withHintText);
|
||||
}
|
||||
|
||||
public MountainwalkAbility(final MountainwalkAbility ability) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author nantuko
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class PlainswalkAbility extends LandwalkAbility {
|
||||
|
||||
|
|
@ -43,7 +43,11 @@ public class PlainswalkAbility extends LandwalkAbility {
|
|||
}
|
||||
|
||||
public PlainswalkAbility() {
|
||||
super(filter);
|
||||
this(true);
|
||||
}
|
||||
|
||||
public PlainswalkAbility(boolean withHintText) {
|
||||
super(filter, withHintText);
|
||||
}
|
||||
|
||||
public PlainswalkAbility(final PlainswalkAbility ability) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ public enum CounterType {
|
|||
LOYALTY("loyalty"),
|
||||
MANNEQUIN("mannequin"),
|
||||
M1M1(new BoostCounter(-1, -1).name),
|
||||
M2M2(new BoostCounter(-2, -2).name),
|
||||
MINING("mining"),
|
||||
P1P0(new BoostCounter(1, 0).name),
|
||||
P1P1(new BoostCounter(1, 1).name),
|
||||
P2P2(new BoostCounter(2, 2).name),
|
||||
PAGE("page"),
|
||||
|
|
@ -126,12 +128,16 @@ public enum CounterType {
|
|||
*/
|
||||
public Counter createInstance(int amount) {
|
||||
switch (this) {
|
||||
case P1P0:
|
||||
return new BoostCounter(1, 0, amount);
|
||||
case P1P1:
|
||||
return new BoostCounter(1, 1, amount);
|
||||
case P2P2:
|
||||
return new BoostCounter(2, 2, amount);
|
||||
case M1M1:
|
||||
return new BoostCounter(-1, -1, amount);
|
||||
case M2M2:
|
||||
return new BoostCounter(-2, -2, amount);
|
||||
default:
|
||||
return new Counter(name, amount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue