Skip to content

Commit c0d15b8

Browse files
committed
Use correct color for energized effect of Channel
1 parent f931bba commit c0d15b8

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

src/main/java/stsjorbsmod/cards/Channel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import com.megacrit.cardcrawl.characters.AbstractPlayer;
66
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
77
import com.megacrit.cardcrawl.monsters.AbstractMonster;
8-
import com.megacrit.cardcrawl.powers.EnergizedBluePower;
98
import stsjorbsmod.JorbsMod;
109
import stsjorbsmod.characters.Wanderer;
10+
import stsjorbsmod.powers.EnergizedCustomPower;
1111

1212
import static stsjorbsmod.JorbsMod.makeCardPath;
1313

@@ -34,7 +34,7 @@ public Channel() {
3434
@Override
3535
public void use(AbstractPlayer p, AbstractMonster m) {
3636
AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p, p, block));
37-
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new EnergizedBluePower(p, magicNumber), magicNumber));
37+
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new EnergizedCustomPower(p, magicNumber), magicNumber));
3838
}
3939

4040
@Override
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package stsjorbsmod.powers;
2+
3+
import com.badlogic.gdx.graphics.Texture;
4+
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
5+
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
6+
import com.megacrit.cardcrawl.core.AbstractCreature;
7+
import com.megacrit.cardcrawl.core.CardCrawlGame;
8+
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
9+
import com.megacrit.cardcrawl.localization.PowerStrings;
10+
import com.megacrit.cardcrawl.powers.AbstractPower;
11+
import stsjorbsmod.JorbsMod;
12+
import stsjorbsmod.util.TextureLoader;
13+
14+
import static stsjorbsmod.JorbsMod.makePowerPath;
15+
16+
public class EnergizedCustomPower extends AbstractPower {
17+
public static final String POWER_ID = JorbsMod.makeID(EnergizedCustomPower.class.getSimpleName());
18+
private static final PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(POWER_ID);
19+
public static final String NAME = powerStrings.NAME;
20+
public static final String[] DESCRIPTIONS = powerStrings.DESCRIPTIONS;
21+
22+
private static final Texture tex84 = TextureLoader.getTexture(makePowerPath("energized_custom_power84.png"));
23+
private static final Texture tex32 = TextureLoader.getTexture(makePowerPath("energized_custom_power32.png"));
24+
25+
public EnergizedCustomPower(AbstractCreature owner, int energyAmt) {
26+
this.name = NAME;
27+
this.ID = POWER_ID;
28+
this.owner = owner;
29+
this.amount = energyAmt;
30+
if (this.amount >= 999) {
31+
this.amount = 999;
32+
}
33+
34+
this.region128 = new TextureAtlas.AtlasRegion(tex84, 0, 0, 84, 84);
35+
this.region48 = new TextureAtlas.AtlasRegion(tex32, 0, 0, 32, 32);
36+
37+
this.updateDescription();
38+
}
39+
40+
public void stackPower(int stackAmount) {
41+
super.stackPower(stackAmount);
42+
if (this.amount >= 999) {
43+
this.amount = 999;
44+
}
45+
}
46+
47+
public void updateDescription() {
48+
this.description = DESCRIPTIONS[0] + this.amount + DESCRIPTIONS[1];
49+
}
50+
51+
public void onEnergyRecharge() {
52+
this.flash();
53+
AbstractDungeon.player.gainEnergy(this.amount);
54+
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID));
55+
}
56+
}

src/main/resources/stsjorbsmodResources/localization/eng/JorbsMod-Card-Strings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@
9292
},
9393
"stsjorbsmod:Channel": {
9494
"NAME": "Channel",
95-
"DESCRIPTION": "Gain !B! Block. Gain !M! [E] next turn."
95+
"DESCRIPTION": "Gain !B! Block. NL Gain !M! [E] next turn."
9696
}
9797
}

src/main/resources/stsjorbsmodResources/localization/eng/JorbsMod-Power-Strings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
" Damage to all enemies and lose all Coil."
3838
]
3939
},
40+
"stsjorbsmod:EnergizedCustomPower": {
41+
"NAME": "Energized",
42+
"DESCRIPTIONS": [
43+
"Gain #b",
44+
" additional [E] next turn."
45+
]
46+
},
4047
"stsjorbsmod:SnappedPower": {
4148
"NAME": "Snapped",
4249
"DESCRIPTIONS": [

0 commit comments

Comments
 (0)