mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[NEO] Implemented Hotshot Mechanic
This commit is contained in:
parent
a85745b694
commit
4409a0aa95
4 changed files with 71 additions and 7 deletions
37
Mage.Sets/src/mage/cards/h/HotshotMechanic.java
Normal file
37
Mage.Sets/src/mage/cards/h/HotshotMechanic.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.CrewIncreasedPowerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HotshotMechanic extends CardImpl {
|
||||
|
||||
public HotshotMechanic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}");
|
||||
|
||||
this.subtype.add(SubType.FOX);
|
||||
this.subtype.add(SubType.PILOT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Hotshot Mechanic crews Vehicles as though its power were 2 greater.
|
||||
this.addAbility(new CrewIncreasedPowerAbility());
|
||||
}
|
||||
|
||||
private HotshotMechanic(final HotshotMechanic card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HotshotMechanic copy() {
|
||||
return new HotshotMechanic(this);
|
||||
}
|
||||
}
|
|
@ -61,6 +61,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Hand of Enlightenment", 11, Rarity.COMMON, mage.cards.h.HandOfEnlightenment.class));
|
||||
cards.add(new SetCardInfo("Hidetsugu, Devouring Chaos", 99, Rarity.RARE, mage.cards.h.HidetsuguDevouringChaos.class));
|
||||
cards.add(new SetCardInfo("High-Speed Hoverbike", 247, Rarity.UNCOMMON, mage.cards.h.HighSpeedHoverbike.class));
|
||||
cards.add(new SetCardInfo("Hotshot Mechanic", 16, Rarity.UNCOMMON, mage.cards.h.HotshotMechanic.class));
|
||||
cards.add(new SetCardInfo("Imperial Moth", 4, Rarity.COMMON, mage.cards.i.ImperialMoth.class));
|
||||
cards.add(new SetCardInfo("Imperial Subduer", 19, Rarity.COMMON, mage.cards.i.ImperialSubduer.class));
|
||||
cards.add(new SetCardInfo("Inkrise Infiltrator", 100, Rarity.COMMON, mage.cards.i.InkriseInfiltrator.class));
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class CrewIncreasedPowerAbility extends StaticAbility {
|
||||
|
||||
public CrewIncreasedPowerAbility() {
|
||||
this("{this}");
|
||||
}
|
||||
|
||||
public CrewIncreasedPowerAbility(String selfName) {
|
||||
super(Zone.BATTLEFIELD, new InfoEffect(selfName + " crews Vehicles as though its power were 2 greater."));
|
||||
}
|
||||
|
||||
private CrewIncreasedPowerAbility(final CrewIncreasedPowerAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrewIncreasedPowerAbility copy() {
|
||||
return new CrewIncreasedPowerAbility(this);
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CrewIncreasedPowerAbility;
|
||||
import mage.abilities.common.CrewWithToughnessAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
|
@ -140,14 +140,12 @@ class CrewCost extends CostImpl {
|
|||
}
|
||||
|
||||
private int getCrewPower(Permanent permanent, Game game) {
|
||||
MageInt crewPowerSource = null;
|
||||
|
||||
if (permanent.hasAbility(CrewWithToughnessAbility.getInstance(), game)) {
|
||||
crewPowerSource = permanent.getToughness();
|
||||
return permanent.getToughness().getValue();
|
||||
} else if (permanent.getAbilities(game).containsClass(CrewIncreasedPowerAbility.class)) {
|
||||
return permanent.getPower().getValue() + 2;
|
||||
} else {
|
||||
crewPowerSource = permanent.getPower();
|
||||
return permanent.getPower().getValue();
|
||||
}
|
||||
|
||||
return crewPowerSource.getValue();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue