-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da16099
commit 9b44841
Showing
18 changed files
with
256 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/main/java/com/megacrit/cardcrawl/mod/replay/actions/unique/MightXAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.megacrit.cardcrawl.mod.replay.actions.unique; | ||
|
||
import com.megacrit.cardcrawl.actions.AbstractGameAction; | ||
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; | ||
import com.megacrit.cardcrawl.actions.common.DamageAction; | ||
import com.megacrit.cardcrawl.cards.DamageInfo; | ||
import com.megacrit.cardcrawl.characters.AbstractPlayer; | ||
import com.megacrit.cardcrawl.core.*; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import com.megacrit.cardcrawl.mod.replay.cards.*; | ||
import com.megacrit.cardcrawl.mod.replay.powers.LanguidPower; | ||
import com.megacrit.cardcrawl.mod.replay.powers.MightPower; | ||
import com.megacrit.cardcrawl.monsters.AbstractMonster; | ||
import com.megacrit.cardcrawl.powers.PoisonPower; | ||
import com.megacrit.cardcrawl.powers.WeakPower; | ||
import com.megacrit.cardcrawl.ui.panels.EnergyPanel; | ||
|
||
public class MightXAction extends AbstractGameAction | ||
{ | ||
private boolean freeToPlayOnce; | ||
private AbstractPlayer p; | ||
private int energyOnUse; | ||
|
||
public MightXAction(final AbstractPlayer p, final boolean freeToPlayOnce, final int energyOnUse) { | ||
this.freeToPlayOnce = false; | ||
this.energyOnUse = -1; | ||
this.p = p; | ||
this.freeToPlayOnce = freeToPlayOnce; | ||
this.duration = Settings.ACTION_DUR_XFAST; | ||
this.actionType = ActionType.SPECIAL; | ||
this.energyOnUse = energyOnUse; | ||
} | ||
|
||
@Override | ||
public void update() { | ||
int effect = EnergyPanel.totalCount; | ||
if (this.energyOnUse != -1) { | ||
effect = this.energyOnUse; | ||
} | ||
if (this.p.hasRelic("Chemical X")) { | ||
effect += 2; | ||
this.p.getRelic("Chemical X").flash(); | ||
} | ||
if (effect > 0) { | ||
AbstractDungeon.actionManager.addToTop(new ApplyPowerAction(this.p, this.p, new MightPower(this.p, effect, false), effect)); | ||
if (!this.freeToPlayOnce) { | ||
this.p.energy.use(EnergyPanel.totalCount); | ||
} | ||
} | ||
this.isDone = true; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/com/megacrit/cardcrawl/mod/replay/cards/colorless/BasicMightCard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.megacrit.cardcrawl.mod.replay.cards.colorless; | ||
|
||
import com.evacipated.cardcrawl.mod.stslib.variables.RefundVariable; | ||
import com.megacrit.cardcrawl.cards.AbstractCard; | ||
import com.megacrit.cardcrawl.characters.AbstractPlayer; | ||
import com.megacrit.cardcrawl.core.CardCrawlGame; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import com.megacrit.cardcrawl.localization.CardStrings; | ||
import com.megacrit.cardcrawl.mod.replay.actions.unique.MightXAction; | ||
import com.megacrit.cardcrawl.monsters.AbstractMonster; | ||
|
||
import basemod.abstracts.CustomCard; | ||
|
||
public class BasicMightCard | ||
extends CustomCard | ||
{ | ||
public static final String ID = "Replay:BasicMightCard"; | ||
private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); | ||
public static final String NAME = cardStrings.NAME; | ||
public static final String DESCRIPTION = cardStrings.DESCRIPTION; | ||
private static final int COST = -1; | ||
|
||
public BasicMightCard() | ||
{ | ||
super(ID, NAME, "cards/replay/replayBetaPower.png", BasicMightCard.COST, DESCRIPTION, AbstractCard.CardType.POWER, AbstractCard.CardColor.COLORLESS, AbstractCard.CardRarity.RARE, AbstractCard.CardTarget.NONE); | ||
RefundVariable.setBaseValue(this, 1); | ||
} | ||
|
||
public void use(AbstractPlayer p, AbstractMonster m) | ||
{ | ||
AbstractDungeon.actionManager.addToBottom(new MightXAction(AbstractDungeon.player, this.freeToPlayOnce, this.energyOnUse)); | ||
} | ||
|
||
public AbstractCard makeCopy() | ||
{ | ||
return new BasicMightCard(); | ||
} | ||
|
||
public void upgrade() | ||
{ | ||
if (!this.upgraded) | ||
{ | ||
upgradeName(); | ||
RefundVariable.upgrade(this, 1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/com/megacrit/cardcrawl/mod/replay/vfx/combat/ShieldingNumberEffect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.megacrit.cardcrawl.mod.replay.vfx.combat; | ||
|
||
import com.megacrit.cardcrawl.vfx.combat.*; | ||
import com.badlogic.gdx.graphics.*; | ||
import com.megacrit.cardcrawl.core.*; | ||
|
||
public class ShieldingNumberEffect extends DamageNumberEffect | ||
{ | ||
private Color originalColor; | ||
|
||
public ShieldingNumberEffect(final AbstractCreature target, final float x, final float y, final int amt) { | ||
super(target, x, y, amt); | ||
this.color = Settings.BLUE_TEXT_COLOR.cpy(); | ||
this.originalColor = this.color.cpy(); | ||
} | ||
|
||
public void update() { | ||
super.update(); | ||
this.color = this.originalColor.cpy(); | ||
} | ||
} |
Oops, something went wrong.