-
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
9 changed files
with
177 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package mod.jedi.relics; | ||
|
||
import basemod.abstracts.CustomRelic; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.megacrit.cardcrawl.actions.utility.UseCardAction; | ||
import com.megacrit.cardcrawl.cards.AbstractCard; | ||
import com.megacrit.cardcrawl.cards.CardQueueItem; | ||
import com.megacrit.cardcrawl.core.Settings; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import com.megacrit.cardcrawl.monsters.AbstractMonster; | ||
|
||
public class CrownOfSimplicity | ||
extends CustomRelic | ||
{ | ||
public static final String ID = "jedi:crownofsimplicity"; | ||
public static final String IMG_PATH = "resources/images/relics/beta_rock.png"; | ||
|
||
public CrownOfSimplicity() | ||
{ | ||
super(ID, new Texture(IMG_PATH), RelicTier.RARE, LandingSound.FLAT); | ||
} | ||
|
||
|
||
public void onUseCard(AbstractCard card, UseCardAction action) | ||
{ | ||
if (card.rarity == AbstractCard.CardRarity.BASIC && !card.purgeOnUse) | ||
{ | ||
this.flash(); | ||
AbstractMonster m = null; | ||
if (action.target != null) { | ||
m = (AbstractMonster)action.target; | ||
} | ||
|
||
AbstractCard tmp = card.makeSameInstanceOf(); | ||
AbstractDungeon.player.limbo.addToBottom(tmp); | ||
tmp.current_x = card.current_x; | ||
tmp.current_y = card.current_y; | ||
tmp.target_x = (float) Settings.WIDTH / 2.0F - 300.0F * Settings.scale; | ||
tmp.target_y = (float)Settings.HEIGHT / 2.0F; | ||
tmp.freeToPlayOnce = true; | ||
if (m != null) { | ||
tmp.calculateCardDamage(m); | ||
} | ||
|
||
tmp.purgeOnUse = true; | ||
AbstractDungeon.actionManager.cardQueue.add(new CardQueueItem(tmp, m, card.energyOnUse)); | ||
} | ||
} | ||
|
||
public String getUpdatedDescription() | ||
{ | ||
return this.DESCRIPTIONS[0]; | ||
} | ||
|
||
public CustomRelic makeCopy() | ||
{ | ||
return new CrownOfSimplicity(); | ||
} | ||
} |
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,41 @@ | ||
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.cards.DamageInfo; | ||
import com.megacrit.cardcrawl.dungeons.AbstractDungeon; | ||
import com.megacrit.cardcrawl.powers.RegenPower; | ||
|
||
public class FirstAidKit | ||
extends CustomRelic | ||
{ | ||
|
||
public static final String ID = "jedi:firstaidkit"; | ||
public static final String IMG_PATH = "resources/images/relics/beta_rock.png"; | ||
|
||
public FirstAidKit() | ||
{ | ||
super(ID, new Texture(IMG_PATH), RelicTier.RARE, LandingSound.FLAT); | ||
} | ||
|
||
|
||
public int onAttacked(DamageInfo info, int damageAmount) | ||
{ | ||
if (info.type != DamageInfo.DamageType.THORNS && info.type != DamageInfo.DamageType.HP_LOSS && info.owner != null && info.owner != AbstractDungeon.player && damageAmount > 0 && !AbstractDungeon.player.hasPower("Buffer")) | ||
{ | ||
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new RegenPower(AbstractDungeon.player, 2), 2)); | ||
} | ||
return damageAmount; | ||
} | ||
|
||
public String getUpdatedDescription() | ||
{ | ||
return this.DESCRIPTIONS[0]; | ||
} | ||
|
||
public CustomRelic makeCopy() | ||
{ | ||
return new FirstAidKit(); | ||
} | ||
} |
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,42 @@ | ||
package mod.jedi.relics; | ||
|
||
import basemod.abstracts.CustomRelic; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.evacipated.cardcrawl.mod.stslib.relics.BetterOnLoseHpRelic; | ||
import com.megacrit.cardcrawl.cards.DamageInfo; | ||
|
||
public class Leech | ||
extends CustomRelic | ||
implements BetterOnLoseHpRelic | ||
{ | ||
public static final String ID = "jedi:leech"; | ||
public static final String IMG_PATH = "resources/images/relics/beta_rock.png"; | ||
|
||
public Leech() | ||
{ | ||
super(ID, new Texture(IMG_PATH), RelicTier.UNCOMMON, LandingSound.FLAT); | ||
} | ||
|
||
@Override | ||
public int betterOnLoseHp(DamageInfo damageInfo, int i) | ||
{ | ||
if (damageInfo.type == DamageInfo.DamageType.HP_LOSS && i > 1) | ||
{ | ||
return i-1; | ||
} | ||
else | ||
{ | ||
return i; | ||
} | ||
} | ||
|
||
public CustomRelic makeCopy() | ||
{ | ||
return new Leech(); | ||
} | ||
|
||
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