Skip to content

Commit

Permalink
Molting no longer triggers twice with one card in hand.
Browse files Browse the repository at this point in the history
Fix bug where Reverse Wither loses its free-ness after clicking it and backing out.
  • Loading branch information
Moocowsgomoo committed Dec 19, 2018
1 parent b8e8690 commit dde0fb3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/main/java/beaked/actions/MoltingAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class MoltingAction extends AbstractGameAction {
private AbstractPlayer p;
public int block;
public int bonusBlock;
public static int numExhausted;

public MoltingAction(AbstractCreature target, AbstractCreature source,int block,int bonusBlock) {
this.p = (AbstractPlayer)target;
Expand All @@ -39,19 +38,17 @@ public void update() {
return;
}

int i;
if (this.p.hand.size() == 1) {
numExhausted = 1;

AbstractCard c = this.p.hand.getTopCard();
gainBlock(c);
this.p.hand.moveToExhaustPile(c);

CardCrawlGame.dungeon.checkForPactAchievement();
this.isDone = true;
return;
}

numExhausted = 1;
AbstractDungeon.handCardSelectScreen.open(TEXT[0], 1, false, false);
this.tickDuration();
return;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/beaked/ui/ReverseWitherEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ReverseWitherEffect extends AbstractGameEffect {
private static final float DUR = 1.5f;
private boolean openedScreen = false;
private Color screenColor = AbstractDungeon.fadeColor.cpy();
public boolean isFree = false;
public boolean isFree;
public boolean choseCard = false;
public ReverseWitherOption button;

Expand All @@ -51,6 +51,7 @@ public void update() {
AbstractDungeon.topLevelEffects.add(new CardGlowBorder(card));
AbstractDungeon.gridSelectScreen.selectedCards.clear();
choseCard = true;
button.isFree = false; // we chose a card, so next time we click the reverse withering button it won't be a free action.
((RestRoom)AbstractDungeon.getCurrRoom()).fadeIn();
}
if(this.duration < 1.0f && !this.openedScreen) {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/beaked/ui/ReverseWitherOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public void setImageAndDescription() {
public void useOption() {
if(this.usable) {
AbstractDungeon.effectList.add(new ReverseWitherEffect(this,this.isFree));
this.isFree = false;
}
}
}
4 changes: 2 additions & 2 deletions src/main/resources/ModTheSpire.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"modid": "beakedthecultist-sts",
"name": "Beaked The Cultist",
"author_list": ["EARL", "fiiiiilth","Moocowsgomoo", "TemmieAnimations", "BlueKnight", "Giuseppe", "MagicHampster", "Ashe","MunderW","Midn8","kiooeht","Reina","Rhapsody and community"],
"description": "Adds Beaked the Cultist as a new playable character.\nBEAKED REQUIRES THE STSLIB MOD!\n\n0.5.8: Fix for Crazy Rituals crashes.\n0.5.7:\n- New Super Rare Boss Relic: Sacred Deck.\n- New Elite card - Reptomancer's Bite.\n- New card - Vigor Burst.\n- New potion - Mending Brew.\n- Reverse Withering is now a free action once per rest site.\n- Huntress Essence no longer draws more on upgrade.\n- Resilience now also causes 4 HP loss.\n- Ritual of Body now requires & spends Ritual.\n- Ruin Sticks is now 1-cost and 17 damage.\n- Redirect can now remove negative Strength.\n- Added config options to disable Super-Rare relics.\n- Rapid-fire attack/heal animations are much faster.\n- Book's Flurry effect clarified.\n- Mantra always shows number of Wither cards.\n- Reverse Withering campfire option positioning.\n- Crazy Rituals now prints info to console.\n- Updated Wither tooltip.\n- Updated Super-Rare relic tooltips.\n- Swapped around some art.\n- Added art for Know Thy Foe and Elite cards.\n- Wording changes.\n\nIf you contributed and don't see your name in the credits, please let us know!",
"description": "Adds Beaked the Cultist as a new playable character.\nBEAKED REQUIRES THE STSLIB MOD!\n\n0.5.9:\n- Fixed Reverse Withering campfire bug.\n- Molting no longer blocks 2x with one card in hand.\n0.5.8: \n- Fix for Crazy Rituals crashes.\n0.5.7:\n- New Super Rare Boss Relic: Sacred Deck.\n- New Elite card - Reptomancer's Bite.\n- New card - Vigor Burst.\n- New potion - Mending Brew.\n- Reverse Withering is now free once per rest site.\n- Huntress Essence no longer draws more on upgrade.\n- Resilience now also causes 4 HP loss.\n- Ritual of Body now requires & spends Ritual.\n- Ruin Sticks is now 1-cost and 17 damage.\n- Redirect can now remove negative Strength.\n- Added config options to disable Super-Rare relics.\n- Rapid-fire attack/heal animations are much faster.\n- Book's Flurry effect clarified.\n- Crazy Rituals now prints info to console.\n- ...and more, check the release notes!\n\nIf you contributed and don't see your name in the credits, please let us know!",
"dependencies": ["basemod","stslib"],
"version": "0.5.8",
"version": "0.5.9",
"sts_version": "12-13-2018",
"mts_version": "3.6.0",
"update_json": "https://api.github.com/repos/fiiiiilth/BeakedTheCultist-StS/releases/latest"
Expand Down

0 comments on commit dde0fb3

Please sign in to comment.