jwoolley / simpleton-mod

A custom character mod for Slay the Spire.
https://steamcommunity.com/sharedfiles/filedetails/?id=1717515299
1 stars 0 forks source link

Bug - Using Crop Rotation with a non-Hayseed character crashes the game #14

Closed Clauvin closed 5 years ago

Clauvin commented 5 years ago

What happenned: in a Custom game, while testing for the lack of an Orb issue (#13), I decided to use Crop Rotation with a Lightning Orb, just to see what it would happen, and the game crashed as a result.

Clues: excerpt of the crash log below. My guess is that the ClassCastException is the reason of the crash.

13:48:34.223 DEBUG thesimpleton.TheSimpletonMod> ============> CropReduceAction::constructor ===== 13:48:34.506 INFO basemod.BaseMod> publish on post power apply 13:48:34.522 INFO basemod.BaseMod> powers modified 13:48:35.439 INFO basemod.BaseMod> publish on card use: TheSimpletonMod:Fertilaser 13:48:37.307 INFO core.CardCrawlGame> PAUSE() 13:49:21.293 INFO core.CardCrawlGame> RESUME() 13:49:31.641 INFO unlock.UnlockTracker> Already seen: TheSimpletonMod:Artichokes 13:49:31.658 INFO unlock.UnlockTracker> Already seen: TheSimpletonMod:Artichokes 13:49:46.659 INFO core.CardCrawlGame> PAUSE() 13:51:58.584 INFO core.CardCrawlGame> RESUME() 13:51:59.630 INFO core.CardCrawlGame> PAUSE() 13:54:09.592 INFO core.CardCrawlGame> RESUME() 13:54:19.484 INFO unlock.UnlockTracker> Already seen: TheSimpletonMod:CropRotation 13:54:19.501 INFO unlock.UnlockTracker> Already seen: TheSimpletonMod:CropRotation 13:54:21.967 INFO basemod.BaseMod> publish on card use: TheSimpletonMod:CropRotation 13:54:22.018 ERROR core.CardCrawlGame> Exception caught java.lang.ClassCastException: com.megacrit.cardcrawl.characters.TheSilent cannot be cast to thesimpleton.characters.TheSimpletonCharacter at thesimpleton.actions.CropRotationAction.update(CropRotationAction.java:50) ~[TheHayseed.jar:?] at com.megacrit.cardcrawl.actions.GameActionManager.update(GameActionManager.java:155) ~[?:?] at com.megacrit.cardcrawl.rooms.AbstractRoom.update(AbstractRoom.java:326) ~[?:?] at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2494) ~[?:?] at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:871) ~[?:?] at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:422) [?:?] at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225) [?:?] at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126) [desktop-1.0.jar:?]

jwoolley commented 5 years ago

Fixed with 6422b62864018023d7543e00ac3101f927960dcd.