|
| 1 | +package stsjorbsmod.cards; |
| 2 | + |
| 3 | +import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; |
| 4 | +import com.megacrit.cardcrawl.actions.common.GainBlockAction; |
| 5 | +import com.megacrit.cardcrawl.characters.AbstractPlayer; |
| 6 | +import com.megacrit.cardcrawl.dungeons.AbstractDungeon; |
| 7 | +import com.megacrit.cardcrawl.monsters.AbstractMonster; |
| 8 | +import com.megacrit.cardcrawl.powers.PoisonPower; |
| 9 | +import stsjorbsmod.JorbsMod; |
| 10 | +import stsjorbsmod.actions.CounterspellAction; |
| 11 | +import stsjorbsmod.characters.Wanderer; |
| 12 | + |
| 13 | +import static stsjorbsmod.JorbsMod.makeCardPath; |
| 14 | + |
| 15 | +public class Counterspell extends AbstractDynamicCard { |
| 16 | + public static final String ID = JorbsMod.makeID(Counterspell.class.getSimpleName()); |
| 17 | + public static final String IMG = makeCardPath("Block_Commons/counterspell.png"); |
| 18 | + |
| 19 | + private static final CardRarity RARITY = CardRarity.COMMON; |
| 20 | + private static final CardTarget TARGET = CardTarget.ENEMY; |
| 21 | + private static final CardType TYPE = CardType.SKILL; |
| 22 | + public static final CardColor COLOR = Wanderer.Enums.COLOR_GRAY; |
| 23 | + |
| 24 | + private static final int COST = 0; |
| 25 | + private static final int BLOCK = 5; |
| 26 | + private static final int UPGRADE_PLUS_BLOCK = 2; |
| 27 | + private static final int ARTIFACT = 1; |
| 28 | + private static final int UPGRADE_PLUS_ARTIFACT = 1; |
| 29 | + |
| 30 | + public Counterspell() { |
| 31 | + super(ID, IMG, COST, TYPE, COLOR, RARITY, TARGET); |
| 32 | + block = baseBlock = BLOCK; |
| 33 | + magicNumber = baseMagicNumber = ARTIFACT; |
| 34 | + } |
| 35 | + |
| 36 | + @Override |
| 37 | + public void use(AbstractPlayer p, AbstractMonster m) { |
| 38 | + AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p, p, block)); |
| 39 | + AbstractDungeon.actionManager.addToBottom(new CounterspellAction(p, m, magicNumber)); |
| 40 | + } |
| 41 | + |
| 42 | + @Override |
| 43 | + public void upgrade() { |
| 44 | + if (!upgraded) { |
| 45 | + upgradeName(); |
| 46 | + upgradeBlock(UPGRADE_PLUS_BLOCK); |
| 47 | + upgradeMagicNumber(UPGRADE_PLUS_ARTIFACT); |
| 48 | + initializeDescription(); |
| 49 | + } |
| 50 | + } |
| 51 | +} |
0 commit comments