Skip to content

Commit

Permalink
0.10.7
Browse files Browse the repository at this point in the history
0.10.7

	Art: New art for Strike.
	Art: New art for Analog.
	Art: New art for Second Hand.
	Art: New art for relic Slippery Goo.
	Art: New art for relic Chronograph.
	Art: New art for relic Cryopreserver.
	Art: New art for relic Metronome.
	Art: Relic Hanging Clock's Outline is fixed.
	Art: Update the outline for Spring Shield.
	Art: New art for event Relicator.
	Art: New art for event Replicator.
	Text: Capitalization was unified across keywords.
	Text: Stun was added as a keyword.
	Text: Sleep was added as a keyword.
	Text: Condensed the description for Chronometer and Chronograph.
	Text: Spring Forward extraneous plural removed.
	Text: Improved text on Wake Up Call.
	Text: Spelling changed from Recurrance to Recurrence.
	Text: Artifact depluralized in Analog.
	Text: Fixed Text of Spiked Shell.
	Text: Recurrence no longer highlights hits in green mistakenly on upgrade.
	Text: Pendulum now specifies a targeted enemy.
	Text: Description for Wake Up Call improved.
	Text: Spiked Shell description improved.
	Feature: Spiked Shell now shows a counter for the damage.
	Feature: Added support for Googly Eyes mod.
	Balance: Changed the frequency of the Artifactor event to twice normal.
	Bug: Spiked Shell now reports the correct damage in its description.
	Bug: Time Dilate no longer attempts to put additional buffs into itself after Recurrence is used on it.
	Bug: Fixed a bug where unseen cards wouldn't have a description available on upgrade.
	Bug: Fixed a huge memory sink on Analog in the Library, due to MegaCrit coding issues.
	Bug: TinyCardPatch no longer has compatibility issues with other mods.
	Bug: Fixed an issue with Pattern Shift not shifting Peppermint correctly on his first turn.
	Bug: Resonant Call now works correctly with Pattern Shift preview.
	Bug: Fixed a Runic Pyramid bug affecting discarded discounted cards.
	Bug: Card retention should no longer affect other mods adversely.
	Bug: Fragmentalize now correctly shatters replicas before doing the damage from them.
	Bug: Wake Up Call power now correctly shows the damage it'll do.
	Bug: Spiked Shell no longer ignores self-retaining cards.
  • Loading branch information
Tempus committed Nov 30, 2018
1 parent 329093d commit 976f0b3
Show file tree
Hide file tree
Showing 43 changed files with 244 additions and 185 deletions.
15 changes: 8 additions & 7 deletions src/main/java/ChronoMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public void receivePostInitialize() {
Texture badgeTexture = ImageMaster.loadImage("chrono_images/badge.png");
BaseMod.registerModBadge(badgeTexture, MOD_NAME, AUTHOR, DESCRIPTION, null);

BaseMod.addEvent(Artifactor.ID, Artifactor.class, Exordium.ID);
// BaseMod.addEvent(Artifactor.ID, Artifactor.class, Exordium.ID);
// BaseMod.addEvent(Artifactor.ID, Artifactor.class, Exordium.ID);
this.loadAudio();
}

Expand Down Expand Up @@ -283,12 +284,12 @@ public void setGameSwitchCards() {
public void receiveEditCards() {
logger.info("Adding cards....");

setCompendiumSwitchCards();
// BaseMod.addCard(new SwitchReapSow());
// BaseMod.addCard(new SwitchExoVibe());
// BaseMod.addCard(new SwitchGoo());
// BaseMod.addCard(new SwitchSavings());
// BaseMod.addCard(new SwitchSharpShooter());
// setCompendiumSwitchCards();
BaseMod.addCard(new SwitchReapSow());
BaseMod.addCard(new SwitchExoVibe());
BaseMod.addCard(new SwitchGoo());
BaseMod.addCard(new SwitchSavings());
BaseMod.addCard(new SwitchSharpShooter());

// BaseMod.addCard(new ASecondTooLate());
BaseMod.addCard(new Accelerando());
Expand Down
9 changes: 1 addition & 8 deletions src/main/java/actions/PatternShiftAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public static boolean nextIntent(AbstractMonster m) {
switch(m.id) {

// firstTurn only
case "AwakenedOne":
case "Chosen":
case "AwakenedOne":
case "Snecko":
ReflectionHacks.setPrivate(m, m.getClass(), "firstTurn", false);
break;
Expand Down Expand Up @@ -210,13 +210,6 @@ public static boolean nextIntent(AbstractMonster m) {
m.createIntent();
return true;

// Spheric Guardian has a secondTurn as well
case "SphericGuardian":
ReflectionHacks.setPrivate(m, m.getClass(), "firstMove", false);
firstMove = (boolean)ReflectionHacks.getPrivate(m, m.getClass(), "firstMove");
if (!firstMove) { ReflectionHacks.setPrivate(m, m.getClass(), "secondMove", false); }
break;

// The Collector has all sorts of stuff, but you can skip his ult
case "TheCollector":
int turnsTaken = (int)ReflectionHacks.getPrivate(m, m.getClass(), "turnsTaken") + 1;
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/cards/Analog.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class texTip {
}
}

public HashMap<String, texTip> icons = new HashMap();
public static HashMap<String, texTip> icons = new HashMap();
private ArrayList<texTip> renderQueue = new ArrayList();

public Analog() {
Expand All @@ -68,11 +68,13 @@ public Analog() {

this.retains = true;

TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("powers/powers.atlas"));
this.icons.put("strength", new texTip(atlas.findRegion("128/strength")));
this.icons.put("dexterity", new texTip(atlas.findRegion("128/dexterity")));
this.icons.put("artifact", new texTip(atlas.findRegion("128/artifact")));
this.icons.put("retain", new texTip(new TextureAtlas.AtlasRegion(ImageMaster.loadImage("chrono_images/powers/RetainOnce.png"), 0, 0, 84, 84)));
if (icons.size() == 0) {
TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("powers/powers.atlas"));
this.icons.put("strength", new texTip(atlas.findRegion("128/strength")));
this.icons.put("dexterity", new texTip(atlas.findRegion("128/dexterity")));
this.icons.put("artifact", new texTip(atlas.findRegion("128/artifact")));
this.icons.put("retain", new texTip(new TextureAtlas.AtlasRegion(ImageMaster.loadImage("chrono_images/powers/RetainOnce.png"), 0, 0, 84, 84)));
}
}

@Override
Expand Down Expand Up @@ -120,7 +122,6 @@ public void use(AbstractPlayer p, AbstractMonster m) {
AbstractDungeon.actionManager.addToBottom(
new ApplyPowerAction(p,p,new RetainOncePower(this.magicNumber),this.magicNumber,true));
}

}
}
}
Expand Down Expand Up @@ -149,7 +150,7 @@ public void unhover() {
public void renderCardTip(SpriteBatch sb) {
super.renderCardTip(sb);

if (AbstractDungeon.player == null) { return; }
if (!CardCrawlGame.isInARun()) { return; }
if ((Settings.hideCards) || (!this.bullshit)) { return; }
if (AbstractDungeon.getCurrRoom().phase != AbstractRoom.RoomPhase.COMBAT) { return; }

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cards/Fragmentalize.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public Fragmentalize() {
public void use(AbstractPlayer p, AbstractMonster m) {
for (AbstractOrb o : p.orbs) {
if (o instanceof ReplicaOrb) {
AbstractDungeon.actionManager.addToBottom(new ShatterAction((ReplicaOrb)o));
AbstractDungeon.actionManager.addToBottom(
new DamageAllEnemiesAction(p, this.multiDamage, this.damageTypeForTurn, AbstractGameAction.AttackEffect.SLASH_HORIZONTAL));
AbstractDungeon.actionManager.addToBottom(new ShatterAction((ReplicaOrb)o));
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/cards/MetricsCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ public abstract class MetricsCard extends CustomCard {

public MetricsCard(String id, String name, String img, int cost, String rawDescription, CardType type, CardColor color, CardRarity rarity, CardTarget target) {
super(id, name, img, cost, rawDescription, type, color, rarity, target);
if (this.name == null) {
this.name = "";
}
if (this.rawDescription == null) {
this.rawDescription = "";
}
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cards/Recurrance.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void upgrade() {
if (!this.upgraded) {
upgradeName();
upgradeDamage(2);
upgradeMagicNumber(HITS_UPGRADE);
// upgradeMagicNumber(HITS_UPGRADE);
}
}
}
6 changes: 6 additions & 0 deletions src/main/java/cards/ResonantCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ public void atTurnStart() {
this.parityUpdate(); }}
}

@Override
public void update() {
super.update();
if (this.mimic != null) { this.mimic.update(); }
}

public void parityUpdate() {
String ATTACKIMG = "chrono_images/cards/Parity.png";
String SKILLIMG = "chrono_images/cards/ParityS.png";
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/events/Artifactor.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ else if (tmp == 1) {
this.imageEventText.clearRemainingOptions();
break;
default:
AbstractDungeon.eventList.remove("Artifactor");
AbstractDungeon.eventList.remove("Artifactor");
AbstractDungeon.eventList.remove("Artifactor");
openMap();
}
}
Expand Down
88 changes: 45 additions & 43 deletions src/main/java/patches/DiscipleExclusiveEventsPatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,51 @@
import chronomuncher.ChronoMod;

public class DiscipleExclusiveEventsPatch {
@SpirePatch(cls = "com.megacrit.cardcrawl.helpers.EventHelper", method = "getEvent")
public static class GetEvent{
public static AbstractEvent Postfix(AbstractEvent __result, String key) {
switch (key)
{
case "Artifactor":
return new Artifactor();
case "Relicator":
return new Relicator();
case "Replicator":
return new Replicator();
}
return __result;
}
}

// @SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.Exordium", method = "initializeEventList")
// public static class initializeEventListEx{
// public static void Postfix(AbstractDungeon dungeon) {
// if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
// ChronoMod.log("Adding additional Artifactor.");
// dungeon.eventList.add(Artifactor.ID);
// }
// }
// }
@SpirePatch(cls = "com.megacrit.cardcrawl.helpers.EventHelper", method = "getEvent")
public static class GetEvent{
public static AbstractEvent Postfix(AbstractEvent __result, String key) {
switch (key)
{
case "Artifactor":
return new Artifactor();
case "Relicator":
return new Relicator();
case "Replicator":
return new Replicator();
}
return __result;
}
}

@SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.Exordium", method = "initializeEventList")
public static class initializeEventListEx{
public static void Postfix(AbstractDungeon dungeon) {
if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
ChronoMod.log("Adding additional Artifactor.");
dungeon.eventList.add(Artifactor.ID);
dungeon.eventList.add(Artifactor.ID);
dungeon.eventList.add(Artifactor.ID);
}
}
}

@SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.TheCity", method = "initializeEventList")
public static class initializeEventListCity{
public static void Postfix(AbstractDungeon dungeon) {
if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
ChronoMod.log("Adding Replicator.");
dungeon.eventList.add(Replicator.ID);
}
}
}
@SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.TheCity", method = "initializeEventList")
public static class initializeEventListCity{
public static void Postfix(AbstractDungeon dungeon) {
if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
ChronoMod.log("Adding Replicator.");
dungeon.eventList.add(Replicator.ID);
}
}
}

@SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.TheBeyond", method = "initializeEventList")
public static class initializeEventListBeyond{
public static void Postfix(AbstractDungeon dungeon) {
if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
ChronoMod.log("Adding Relicator.");
dungeon.eventList.add(Relicator.ID);
}
}
}
@SpirePatch(cls = "com.megacrit.cardcrawl.dungeons.TheBeyond", method = "initializeEventList")
public static class initializeEventListBeyond{
public static void Postfix(AbstractDungeon dungeon) {
if (dungeon.player.chosenClass == Enum.CHRONO_CLASS) {
ChronoMod.log("Adding Relicator.");
dungeon.eventList.add(Relicator.ID);
}
}
}
}
46 changes: 28 additions & 18 deletions src/main/java/patches/RestoreRetainedCardsEnergyUse.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.evacipated.cardcrawl.modthespire.lib.SpireField;
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
import com.evacipated.cardcrawl.modthespire.lib.SpireReturn;
import com.evacipated.cardcrawl.modthespire.lib.SpireInsertPatch;

import com.megacrit.cardcrawl.actions.unique.RestoreRetainedCardsAction;
Expand Down Expand Up @@ -52,39 +53,47 @@ public static void upgradeFromChronograph(AbstractCard c) {
@SpirePatch(cls = "com.megacrit.cardcrawl.cards.AbstractCard", method="resetAttributes")
public static class resetAttributes {

public static void Replace(AbstractCard __instance)
public static SpireReturn Prefix(AbstractCard __instance)
{
__instance.block = __instance.baseBlock;
__instance.isBlockModified = false;
__instance.damage = __instance.baseDamage;
__instance.isDamageModified = false;
__instance.magicNumber = __instance.baseMagicNumber;
__instance.isMagicNumberModified = false;
__instance.damageTypeForTurn = (DamageInfo.DamageType)ReflectionHacks.getPrivate(__instance, AbstractCard.class, "damageType");

// Check required for Compendium
if (AbstractDungeon.player != null) {

// We have a discounting relic, and the card is in the player's hand
// Duplicated because patches suck
__instance.block = __instance.baseBlock;
__instance.isBlockModified = false;
__instance.damage = __instance.baseDamage;
__instance.isDamageModified = false;
__instance.magicNumber = __instance.baseMagicNumber;
__instance.isMagicNumberModified = false;
__instance.damageTypeForTurn = (DamageInfo.DamageType)ReflectionHacks.getPrivate(__instance, AbstractCard.class, "damageType");

// We have a discounting relic, and the card is in the player's hand, and it should be discounted (retain or equilibrium)
if ((AbstractDungeon.player.hasRelic("Chronometer") || AbstractDungeon.player.hasRelic("Chronograph"))
&& AbstractDungeon.player.hand.contains(__instance)
&& ((__instance.retain == true) || AbstractDungeon.player.hasPower("Equilibrium"))) {
// lower costs and such
RestoreRetainedCardsEnergyUse.lowerCostFromRetain(__instance);
RestoreRetainedCardsEnergyUse.upgradeFromChronograph(__instance);
return SpireReturn.Return(null);
}

// No discounting relic exists
// The card has previously been discounted, and should not be discounted
// This only happens if it is in your hand, you have runic pyramid, and it's been retained before
else if (AbstractDungeon.player.hand.contains(__instance)
&& AbstractDungeon.player.hasRelic("Runic Pyramid")
&& RetainedForField.retainedFor.get(__instance) > 0) {
// Just leave kthx
return SpireReturn.Return(null);
}

// No discounting relic exists, or it shouldn't be discounted
else {
if ((AbstractDungeon.player.hasRelic("Runic Pyramid") && RetainedForField.retainedFor.get(__instance) > 0)
&& (AbstractDungeon.player.hasRelic("Chronometer") || AbstractDungeon.player.hasRelic("Chronograph"))) {
return;
}
__instance.costForTurn = __instance.cost;
__instance.isCostModifiedForTurn = false;
RetainedForField.retainedFor.set(__instance, 0);
return SpireReturn.Continue();
}
}

return SpireReturn.Continue();
}
}

Expand Down Expand Up @@ -115,11 +124,12 @@ public static void Replace(AbstractCard __instance)
@SpirePatch(clz = RetainCardPower.class, method="atEndOfTurn")
public static class atEndOfTurn {

public static void Replace(AbstractPower __instance, boolean isPlayer)
public static SpireReturn Prefix(AbstractPower __instance, boolean isPlayer)
{
if ((isPlayer) && (!AbstractDungeon.player.hand.isEmpty())) {
AbstractDungeon.actionManager.addToBottom(new RetainCardsAction(__instance.owner, __instance.amount));
}
return SpireReturn.Return(null);
}
}
}
Loading

0 comments on commit 976f0b3

Please sign in to comment.