kiooeht / stslib Goto Github PK
View Code? Open in Web Editor NEWA collection of keywords and mechanics for other Slay the Spire mods to use.
License: MIT License
A collection of keywords and mechanics for other Slay the Spire mods to use.
License: MIT License
Hi, I'm using StunMonsterAction to apply StunMonsterPower on enemies.
I noticed that if StunMonsterPower (1 amount) is applied on a byrd (a bird monster that attacks with 1x5 or 1x6 damage) and the byrd is fallen down in the same turn, then it will try to attack with 1x5 damage even it is on the ground. Please see the attached screenshot below.
Screenshot - see the leftmost byrd
Thanks,
As title says, but I will add some details when and why. Usually everything is fine, but once mod creator starts using token cards for choices, or maybe reprints some cards and will reuse the descriptions of original cards, then the message that a CardString for ID doesn't exist whenever new instance of a card is created, which can quickly get out hand when looking at card library, which constantly makes new instances, and the logs with a lot of some unwanted text.
EDIT: I made a mistake, when it comes to amount of instances of cards that are created normally.
After the new patch of main game (maybe from 07-05-2019 version?), onCardDraw() is called twice for a single card.
On the current Beta Branch the invisible powers are still invisible, but when hovering over the player character still show power tips.
Hi, I recently downloaded ModTheSpire and have not been able to get it to work. I tried all the trouble shooting, and made sure that the mods I am trying to run have all been updated AFTER BaseMod was last updated.
I'm updating Slay The Spire as we speak (slow internet) and as if that fixes it I will close the issue. But it looks like the issues might be with StSLib (which is why I'm posting it here, idk, my coding knowledge is severely limited), here is the error:
Running with debug mode turned ON...
ModVersion Info:
Begin patching...
Finding core patches...
Finding patches...
com.evacipated.cardcrawl.modthespire.patcher.PatchingException: com.megacrit.cardcrawl.screens.SingleCardViewPopup.renderPortrait(com.badlogic.gdx.graphics.g2d.SpriteBatch): Location matching given description could not be found for patch
at com.evacipated.cardcrawl.modthespire.lib.LineFinder.findInOrder(LineFinder.java:39)
at com.evacipated.cardcrawl.modthespire.lib.LineFinder.findInOrder(LineFinder.java:32)
at basemod.patches.com.megacrit.cardcrawl.screens.SingleCardViewPopup.MissingPortraitFix$Locator.Locate(MissingPortraitFix.java:34)
at com.evacipated.cardcrawl.modthespire.patcher.LocatorInfo.findLines(LocatorInfo.java:22)
at com.evacipated.cardcrawl.modthespire.Patcher.injectPatches(Patcher.java:310)
at com.evacipated.cardcrawl.modthespire.Patcher.injectPatches(Patcher.java:185)
at com.evacipated.cardcrawl.modthespire.Loader.runMods(Loader.java:199)
at com.evacipated.cardcrawl.modthespire.ui.ModSelectWindow.lambda$null$1(ModSelectWindow.java:266)
at java.lang.Thread.run(Unknown Source)
I hope I don't seem overly dumb, but I probably do, haha.
I believe I discovered a bug with the Temporary HP implementation. In the base game code, there are several damage calculation steps that are not being applied when the creature has Temporary HP.
For example, I noticed this issue while playing a run where I had the relics Tungsten Rod and Blue Candle. With these two relics in play, I expect to receive 0 damage and lose 0 HP when I play a Curse card. Blue Candle allows Curses to be played for the cost of 1 HP, while Tungsten Rod should reduce any HP damage by 1, resulting in the expected result of 0 damage.
However, when I had Temporary HP active this was not the behavior, and instead I lost 1 TempHP whenever I played a Curse. Whenever I play a Curse without any TempHP, I do indeed receive 0 damage as expected.
I believe this is a bug in the StS-Lib code, as I was able to reproduce the same behavior in a vanilla run with no mods active aside from BaseMod and StS-Lib (although I did modify StS-Lib slightly to allow me to gain TempHP via the BaseMod console).
I believe this is caused by the way the PlayerDamage and MonsterDamage patches are applied. The logic for these patches is applied directly after the decrementBlock() function is called, but there are several damage calculation steps that occur after this point.
To fix the issue, I reorganized the patch code slightly by applying 2 locator classes instead. The first bit of logic should still run after decrementBlock(), but the actual damage ignore step should be performed after all other damage calculation checks.
There is almost certainly cleaner and better ways to fix this issue, but this code does appear to work correctly so I will raise a pull request and allow the repository maintainers determine how to proceed.
Please let me know if you have any questions!
Bug Demo: https://youtu.be/sno7SQy8cy4
Fix Demo: https://youtu.be/HYLHHmMCIvM
There is DamageRandomEnemyAction in the base game. But I want something likes ApplyPowerRandomEnemyAction, RemoveBlockRandomEnemyAction ……
StsLib now has SelectCardsAction with a callbak. What about a RandomEnemyAction with a Callback for moder do something to the monster?
What happened: If you stun Writhing Mass, it doesn't show the Stunned intent, but the next intent it would do if not Stunned instead.
How to reproduce:
Result after that:
It IS stunned and won't attack, but the intent is wrong.
Hello,
I'm trying to make a power wich triggers when a card is discarded.
I was surprised to find out AbstractPower doesn't have a onManualDiscard method contrary to AbstractRelic.
I also couldn't find a subscriber or hook that triggers on discard.
Any of those would be pretty useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.