From e40aec6bc312368fc95454b9b74ff41db4a4553b Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 17:39:10 +0300 Subject: [PATCH] Implement cards: Zhang He, Wei General; Zhang Liao, Hero of Hefei; Zhao Zilong, Tiger General; and Zuo Ci, The Mocking Sage --- .../ZhangHeWeiGeneral.java | 71 +++++++++++++++++ .../ZhangLiaoHeroOfHefei.java | 65 ++++++++++++++++ .../ZhaoZilongTigerGeneral.java | 70 +++++++++++++++++ .../ZuoCiTheMockingSage.java | 78 +++++++++++++++++++ 4 files changed, 284 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangHeWeiGeneral.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangLiaoHeroOfHefei.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ZhaoZilongTigerGeneral.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ZuoCiTheMockingSage.java diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangHeWeiGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangHeWeiGeneral.java new file mode 100644 index 00000000000..21d68409404 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangHeWeiGeneral.java @@ -0,0 +1,71 @@ +/* + * 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.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ZhangHeWeiGeneral extends CardImpl { + + public ZhangHeWeiGeneral(UUID ownerId) { + super(ownerId, 95, "Zhang He, Wei General", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Whenever Zhang He, Wei General attacks, each other creature you control gets +1/+0 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn, + new FilterCreaturePermanent(), true), false)); + } + + public ZhangHeWeiGeneral(final ZhangHeWeiGeneral card) { + super(card); + } + + @Override + public ZhangHeWeiGeneral copy() { + return new ZhangHeWeiGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangLiaoHeroOfHefei.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangLiaoHeroOfHefei.java new file mode 100644 index 00000000000..7d3cd947403 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangLiaoHeroOfHefei.java @@ -0,0 +1,65 @@ +/* + * 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.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZhangLiaoHeroOfHefei extends CardImpl { + + public ZhangLiaoHeroOfHefei(UUID ownerId) { + super(ownerId, 96, "Zhang Liao, Hero of Hefei", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Zhang Liao, Hero of Hefei deals damage to an opponent, that opponent discards a card. + this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1), false)); + } + + public ZhangLiaoHeroOfHefei(final ZhangLiaoHeroOfHefei card) { + super(card); + } + + @Override + public ZhangLiaoHeroOfHefei copy() { + return new ZhangLiaoHeroOfHefei(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhaoZilongTigerGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhaoZilongTigerGeneral.java new file mode 100644 index 00000000000..221dd7ec38c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhaoZilongTigerGeneral.java @@ -0,0 +1,70 @@ +/* + * 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.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZhaoZilongTigerGeneral extends CardImpl { + + public ZhaoZilongTigerGeneral(UUID ownerId) { + super(ownerId, 33, "Zhao Zilong, Tiger General", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Whenever Zhao Zilong, Tiger General blocks, it gets +1/+1 until end of turn. + this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public ZhaoZilongTigerGeneral(final ZhaoZilongTigerGeneral card) { + super(card); + } + + @Override + public ZhaoZilongTigerGeneral copy() { + return new ZhaoZilongTigerGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ZuoCiTheMockingSage.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZuoCiTheMockingSage.java new file mode 100644 index 00000000000..a85f7893719 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZuoCiTheMockingSage.java @@ -0,0 +1,78 @@ +/* + * 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.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class ZuoCiTheMockingSage extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public ZuoCiTheMockingSage(UUID ownerId) { + super(ownerId, 165, "Zuo Ci, the Mocking Sage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + // Zuo Ci, the Mocking Sage can't be blocked by creatures with horsemanship. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public ZuoCiTheMockingSage(final ZuoCiTheMockingSage card) { + super(card); + } + + @Override + public ZuoCiTheMockingSage copy() { + return new ZuoCiTheMockingSage(this); + } +}