Git Product home page Git Product logo

stslib's People

Contributors

alchyr avatar bkerns724 avatar celicath avatar darkvexon avatar erasels avatar godinj avatar herbix avatar jamestripleq avatar jedi515 avatar johnnybazooka89 avatar kiooeht avatar mistressalison avatar mwallx avatar nellydevo avatar pandemonium14 avatar rainfoxest avatar red5h4d0w avatar reinashsl avatar rft50 avatar rincamelia avatar the-evil-pickle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stslib's Issues

Implementation of flavor text can add unnecessary information to the logs

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.

Probably Just Being Stupid, But:

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:

  • Java version (1.8.0_144)
  • Slay the Spire (11-15-2018)
  • ModTheSpire (3.6.3)
    Mod list:
  • basemod (5.5.0)
  • stslib (1.10.0)
  • Friendly_Minions_0987678 (0.1.1)

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.

Temporary HP Damage Bug

Description

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).

Steps to Reproduce

  1. Compile a version of StS-Lib that allows you to gain TempHP somehow. Originally I tested by adding a temporary card to the game which gave the player TempHP, but later also did further testing using a custom BaseMod console command.
  2. Start the game with only BaseMod and the modified StS-Lib mod active.
  3. Start a fresh run with any character.
  4. Get through Neow and enter the first combat.
  5. Run the following BaseMod commands:
    • hand discard all
    • hand add Strike_R
    • hand add AscendersBane
    • power Strength -2 (note: apply to yourself)
    • relic add Boot
    • relic add Blue_Candle
    • relic add TungstenRod
  6. Apply TempHP to both the player and enemy via your chosen method.
  7. Play a copy of Ascender's Bane. Note the player will lose 1 TempHP.
  8. Attack the enemy with your Strike. Note the enemy will only take 4 damage, rather than the expected 5.

Reproduced with Mods

  • BaseMod (v5.52.3)
  • StS-Lib (v2.10.1)

Notes

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!

Videos

Bug Demo: https://youtu.be/sno7SQy8cy4

Fix Demo: https://youtu.be/HYLHHmMCIvM

RandomMonsterAction

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?

StunMonsterAction - If you stun Writhing Mass, it doesn't show the Stunned intent, but the next intent it would do if not Stunned instead

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:

  • Start the game with StSLib and Quarter Circle Forward PUNCH Mod.
  • Start a run.
  • Use console for the following commands:
  • relic add qcfpunch:Red_Cyclone_Teachings (this relic makes the first 2 cost-3-or-more attacks stun all their targets, with StunMonsterAction is the attack has one single target).
  • deck remove all
  • deck add Bludgeon 5
  • fight Writhing Mass
  • Use Bludgeon against Writhing Mass.

Result after that:

image

It IS stunned and won't attack, but the intent is wrong.

OnDiscard Power Hook

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.