-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfiniteUpgradeAttack.java
More file actions
53 lines (44 loc) · 1.58 KB
/
InfiniteUpgradeAttack.java
File metadata and controls
53 lines (44 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package examplemod.cards.examples;
import basemod.helpers.CardModifierManager;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import examplemod.cards.BaseCard;
import examplemod.util.CardStats;
public class InfiniteUpgradeAttack extends BaseCard {
public static final String ID = makeID("InfiniteUpgradeAttack");
private final static CardStats CARD_STATS = new CardStats(
CardColor.COLORLESS,
CardType.ATTACK,
CardRarity.SPECIAL,
CardTarget.ENEMY,
1);
private static final int DAMAGE = 4;
public InfiniteUpgradeAttack() {
super(ID, CARD_STATS, false);
setDamage(DAMAGE);
setMagic(3);
}
public boolean canUpgrade() {
return true;
}
@Override
public void upgrade() {
this.upgradeDamage(5 * this.timesUpgraded);
++this.timesUpgraded;
this.upgraded = true;
this.name = cardStrings.NAME + "+" + this.timesUpgraded;
this.initializeTitle();
}
@Override
public void use(AbstractPlayer p, AbstractMonster m) {
addToBot(new DamageAction(m, new DamageInfo(p, this.damage, this.damageTypeForTurn), AbstractGameAction.AttackEffect.SMASH));
}
@Override
public AbstractCard makeCopy() {
return new InfiniteUpgradeAttack();
}
}