-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
210 additions
and
3 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
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,95 @@ | ||
package mod.jedi.cards.red; | ||
|
||
import basemod.abstracts.CustomCard; | ||
import com.evacipated.cardcrawl.mod.stslib.fields.cards.AbstractCard.FleetingField; | ||
import com.megacrit.cardcrawl.actions.animations.TalkAction; | ||
import com.megacrit.cardcrawl.actions.common.DamageAction; | ||
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction; | ||
import com.megacrit.cardcrawl.cards.AbstractCard; | ||
import com.megacrit.cardcrawl.cards.DamageInfo; | ||
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.monsters.AbstractMonster; | ||
import com.megacrit.cardcrawl.powers.*; | ||
import conspire.powers.GhostlyPower; | ||
import conspire.powers.HolyPower; | ||
import sts_jedi.jedi; | ||
|
||
public class OneStrike | ||
extends CustomCard | ||
{ | ||
|
||
public static final String ID = "jedi:onestrike"; | ||
private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); | ||
public static final String NAME = cardStrings.NAME; | ||
public static final String DESCRIPTION = cardStrings.DESCRIPTION; | ||
public static final String UPGRADE_DESCRIPTION = cardStrings.UPGRADE_DESCRIPTION; | ||
public static final int COST = 3; | ||
public static final String IMG_PATH = "resources/images/cards/jedi_beta_attack.png"; | ||
|
||
public OneStrike() | ||
{ | ||
super(ID, NAME, IMG_PATH, COST, DESCRIPTION, CardType.ATTACK, CardColor.RED, CardRarity.SPECIAL, CardTarget.ENEMY); | ||
this.tags.add(CardTags.STRIKE); | ||
this.exhaust = true; | ||
this.cantUseMessage = "Cannot be used on bosses."; | ||
FleetingField.fleeting.set(this, true); | ||
} | ||
|
||
|
||
public void use(AbstractPlayer p, AbstractMonster m) { | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveAllTemporaryHPAction(m, p)); | ||
// AbstractDungeon.actionManager.addToBottom(new ReplayLoseAllShieldingAction(m, p)); | ||
// There's no monster that uses temp.hp or shielding, so why bother. | ||
|
||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, BufferPower.POWER_ID)); | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, IntangiblePower.POWER_ID)); | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, IntangiblePlayerPower.POWER_ID)); | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, InvinciblePower.POWER_ID)); | ||
// if (jedi.isConspireLoaded) | ||
// { | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, GhostlyPower.POWER_ID)); | ||
// AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, HolyPower.POWER_ID)); | ||
// } | ||
|
||
for (AbstractPower pow : m.powers) | ||
{ | ||
AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, pow.ID)); | ||
} | ||
|
||
AbstractDungeon.actionManager.addToBottom(new DamageAction(m, new DamageInfo(p, m.maxHealth * 2, DamageInfo.DamageType.HP_LOSS))); | ||
AbstractDungeon.actionManager.addToBottom(new TalkAction(true, "ONE STRIKE!", 1.0F, 2.0F)); | ||
} | ||
|
||
@Override | ||
public void upgrade() | ||
{ | ||
if (!this.upgraded) { | ||
this.name += " Plus Ultra"; | ||
initializeTitle(); | ||
this.rawDescription = UPGRADE_DESCRIPTION; | ||
initializeDescription(); | ||
} | ||
} | ||
|
||
|
||
public boolean canUse(AbstractPlayer p, AbstractMonster m) | ||
{ | ||
boolean canUse = false; | ||
if (m != null) { | ||
if (m.type != AbstractMonster.EnemyType.BOSS) { | ||
canUse = true; | ||
} | ||
} | ||
|
||
return canUse; | ||
} | ||
|
||
public AbstractCard makeCopy() | ||
{ | ||
return new OneStrike(); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package mod.jedi.patches; | ||
|
||
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch; | ||
import com.megacrit.cardcrawl.cards.AbstractCard; | ||
import com.megacrit.cardcrawl.cards.red.PerfectedStrike; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import mod.jedi.cards.red.StrikingStrike; | ||
|
||
@SpirePatch(clz = PerfectedStrike.class, method = "countCards") | ||
public class StrikingStrikePatch | ||
{ | ||
public static int Postfix(int __result) | ||
{ | ||
for (AbstractCard c : AbstractDungeon.player.hand.group) | ||
{ | ||
if (c instanceof StrikingStrike) { | ||
__result++; | ||
} | ||
} | ||
|
||
for (AbstractCard c : AbstractDungeon.player.drawPile.group) | ||
{ | ||
if (c instanceof StrikingStrike) { | ||
__result++; | ||
} | ||
} | ||
|
||
for (AbstractCard c : AbstractDungeon.player.discardPile.group) | ||
{ | ||
if (c instanceof StrikingStrike) { | ||
__result++; | ||
} | ||
} | ||
|
||
return __result; | ||
} | ||
|
||
} |
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,31 @@ | ||
package mod.jedi.relics; | ||
|
||
import basemod.abstracts.CustomRelic; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import com.megacrit.cardcrawl.powers.PlatedArmorPower; | ||
|
||
public class HeavyJacket | ||
extends CustomRelic | ||
{ | ||
|
||
public static final String ID = "jedi:heavyjacket"; | ||
public static final String IMG_PATH = "resources/images/relics/beta_rock.png"; | ||
|
||
public HeavyJacket() | ||
{ | ||
super(ID, new Texture(IMG_PATH), RelicTier.UNCOMMON, LandingSound.FLAT); | ||
} | ||
|
||
public void atBattleStart() | ||
{ | ||
int PA = AbstractDungeon.player.relics.size() / 2; | ||
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PlatedArmorPower(AbstractDungeon.player, PA), PA)); | ||
} | ||
|
||
public String getUpdatedDescription() | ||
{ | ||
return this.DESCRIPTIONS[0]; | ||
} | ||
} |
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