stsdb 0.2.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stsdb
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Deterministic Slay the Spire card and relic query toolset
5
5
  Author: Taardisaa
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "stsdb"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "Deterministic Slay the Spire card and relic query toolset"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -0,0 +1,3 @@
1
+ from .core import query_card, query_potion, query_power, query_relic
2
+
3
+ __all__ = ["query_card", "query_potion", "query_power", "query_relic"]
@@ -192,3 +192,24 @@ def query_potion(name: str):
192
192
  if potion is None:
193
193
  return {"found": False, "error": "POTION_NOT_FOUND"}
194
194
  return {"found": True, "entry": dict(potion)}
195
+
196
+
197
+ @lru_cache(maxsize=1)
198
+ def _powers_by_name():
199
+ powers = {}
200
+ with _data_path("power.csv").open("r", encoding="utf-8", newline="") as f:
201
+ reader = csv.reader(f, delimiter=";")
202
+ for row in reader:
203
+ name, description = row
204
+ powers[name.lower()] = {
205
+ "name": name,
206
+ "description": description,
207
+ }
208
+ return powers
209
+
210
+
211
+ def query_power(name: str):
212
+ power = _powers_by_name().get(name.lower())
213
+ if power is None:
214
+ return {"found": False, "error": "POWER_NOT_FOUND"}
215
+ return {"found": True, "entry": dict(power)}
@@ -370,3 +370,20 @@ Omega;Special;Power;3;At the end of your turn, deal 50 damage to ALL enemies.
370
370
  Safety;Special;Skill;1;Retain. Gain 12 Block. Exhaust.
371
371
  Smite;Special;Attack;1;Retain. Deal 12 damage. Exhaust.
372
372
  Through Violence;Special;Attack;0;Retain. Deal 20 damage. Exhaust.
373
+ Allocate;NULL;Skill;1;Gain X Focus. Lose 1 Strength. Lose 1 Dexterity.
374
+ Axe Kick;NULL;Attack;1;Deal X damage. Evoke your next Orb.
375
+ Blaster;NULL;Skill;1;Deprecated.
376
+ Energy Pulse;NULL;Skill;1;Gain Block equal to your Energy.
377
+ Flux Capacitor;NULL;Skill;1;Replace all Channeled Orbs with Plasma. Exhaust.
378
+ Hide;NULL;Skill;1;You cannot lose HP until the start of your next turn. Exhaust.
379
+ Mastery;NULL;Skill;1;Whenever you attempt to switch Stances to your current Stance, gain Block.
380
+ Wrath;NULL;Attack;1;Deal and receive double attack damage.
381
+ Calm;NULL;Skill;1;Upon exiting Calm, gain 2 Energy.
382
+ Clarity;NULL;Skill;1;Look at the top X cards of your draw pile. Add 1 to your hand. Exhaust the other.
383
+ Truth;NULL;Attack;1;Retain. Deal X damage. Draw X card. Exhaust.
384
+ Wisdom;NULL;Skill;1;Retain. Draw X cards. Exhaust.
385
+ Peace;NULL;Skill;1;Retain. ALL enemies lose X Strength this turn. Exhaust.
386
+ Cleanse Evil;NULL;Skill;1;Add X Smite into your hand.
387
+ Transcendence;NULL;Skill;1;Upgrade all cards that Retain in your hand.
388
+ Unraveling;NULL;Skill;1;Play all of your cards from left to right. Targets are chosen randomly. Exhaust.
389
+ Causality;NULL;Skill;1;Draw cards until your hand is full. Exhaust.
@@ -0,0 +1,156 @@
1
+ Accuracy;Shivs deal additional damage.
2
+ Rushdown;Whenever you enter Wrath, draw card.
3
+ After Image;Whenever you play a card, gain Block.
4
+ Amplify;Your next Power card is played twice this turn.
5
+ Live Forever;At the end of your turn, gain Plated Armor.
6
+ Enrage;Whenever you play a Skill, gains Strength.
7
+ Angry;Upon receiving attack damage, gains Strength.
8
+ Artifact;Negates debuff.
9
+ Attack Burn;For turn, whenever you play an Attack, Exhaust it.
10
+ Back Attack;Deals 50% more damage as it is attacking you from behind.
11
+ Barricade;Block is not removed at the start of your turn.
12
+ Battle Hymn;At the start of your turn, add Smites into your hand.
13
+ Beat Of Death;Whenever you play a card, take damage.
14
+ Berserk;At the start of your turn, gain.
15
+ Bias;At the start of your turn, lose Focus.
16
+ Block Return;When attacked, you gain Block.
17
+ Blur;Block is not removed at the start of your next turn.
18
+ Brutality;At the start of your turn, lose HP and draw card.
19
+ Buffer;Prevent the next time you would lose HP.
20
+ Bullet Time;The energy cost of all Green cards are now 0.
21
+ Burst;Your next Skill is played twice this turn.
22
+ Cannot Change Stance;Cannot change your stance this turn.
23
+ Choked;Whenever you play a card this turn, loses HP.
24
+ Collect;At the start of your next turn, put a Miracle+ into your hand.
25
+ Combust;At the end of your turn, lose HP and deal damage to ALL enemies.
26
+ Reactive;Upon receiving attack damage, changes its intent.
27
+ Confusion;Whenever you draw a card, randomize its cost.
28
+ Conserve;Energy is conserved this turn.
29
+ Constricted;At the end of your turn, take damage.
30
+ Mental Fortress;Whenever you switch Stances, gain Block.
31
+ Corpse Explosion;On death, deal damage equal to its Max HP to ALL enemies.
32
+ Corruption;Skills cost 0.
33
+ Creative AI;At the start of your turn, add random Power card into your hand.
34
+ Curiosity;Whenever you play a Power card, gains Strength.
35
+ Curl Up;On receiving attack damage, rolls up and gains Block.
36
+ Dark Embrace;Whenever a card is Exhausted, draw 1 card.
37
+ Demon Form;At the start of your turn, gain Strength.
38
+ Deva;At the start of your turn, gain Energy and increase this amount by 1.
39
+ Devotion;At the start of your turn, gain Mantra.
40
+ Dexterity Down;At the end of this turn, lose Dexterity.
41
+ Dexterity;Increases Block gained from cards by this amount.
42
+ Double Damage;Attacks deal double damage for turn.
43
+ Double Tap;Your next Attack is played twice this turn.
44
+ Draw;At the start of your turn, draw additional card.
45
+ Draw Card;Draw additional cards next turn.
46
+ Draw Down;Draw less card next turn.
47
+ Draw Reduction;Draw 1 less card next turn.
48
+ Duplication;Your next card is played twice this turn.
49
+ Echo Form;The first card you play each turn is played twice.
50
+ Electro;Lightning hits ALL enemies.
51
+ Blasphemer;At the start of your turn, die.
52
+ Energized;Gain additional [G] next turn.
53
+ Fasting;At the start of your turn, lose.
54
+ Entangled;You cannot play Attacks this turn.
55
+ Envenom;Whenever you deal unblocked attack damage, apply Poison.
56
+ Equilibrium;Retain your hand this turn.
57
+ Establishment;Whenever a card is Retained, lower its cost by .
58
+ Evolve;Whenever you draw a Status card, draw 1 card.
59
+ Explosive;Explodes in turns, dealing damage.
60
+ Extra Cards;Draw 1 additional card next turn.
61
+ Fading;Dies in turns.
62
+ Feel No Pain;Whenever a card is Exhausted, gain Block.
63
+ Fire Breathing;Whenever you draw a Status or Curse card, deal damage to ALL enemies.
64
+ Flame Barrier;When attacked, deals damage back.
65
+ Strength Down;At the end of this turn, lose Strength.
66
+ Flight;Receives 50% less attack damage.
67
+ Focus;Increases the effectiveness of Orbs by this amount.
68
+ Frail;Gain 25% less Block from cards for this turn.
69
+ Free Attack Power;Ignore energy cost on the next Attack you play.
70
+ Gambit;After turn, gain turns, gain [B] .
71
+ Growth;At the end of its turn, gains Strength.
72
+ Heatsink;Whenever you play a Power card, draw card.
73
+ Hello;At the start of your turn, add random Common cards into your hand.
74
+ Hex;Whenever you play a non-Attack card, shuffle Dazed into your draw pile.
75
+ Infinite Blades;At the start of your turn, add Shivs into your hand.
76
+ Intangible;Reduce ALL damage taken and HP loss to 1 this turn.
77
+ Inverted;Immune to damage.
78
+ Invincible;Can only lose more HP this turn.
79
+ Juggernaut;Whenever you gain Block, deal damage to a random enemy.
80
+ Knowledge;Whenever you play a Power card, draw cards.
81
+ Life Link;If other enemies are still alive, revives in 2 turns at 50% HP.
82
+ Like Water;At the end of your turn, if you are in Calm, gain Block.
83
+ Lock-On;Receives % more damage from Orbs for turn.
84
+ Loop;At the start of your turn, trigger the passive ability of your next Orb.
85
+ Machine Learning;At the start of your turn, draw additional card.
86
+ Magnetism;At the start of your turn, add %s random Colorless card into your hand.
87
+ Malleable;Upon receiving attack damage, gains Block.
88
+ Mantra;When you obtain Mantra, enter Divinity.
89
+ Master Reality;Whenever a card is created, it is Upgraded.
90
+ Mayhem;At the start of your turn, play the top card of your draw pile.
91
+ Metallicize;At the end of your turn, gain Block.
92
+ Minion;Minions abandon combat without their leader.
93
+ Mode Shift;After receiving damage, changes to a defensive mode.
94
+ Next Turn Block;Gain Block next turn.
95
+ Nightmare;Add cards into your hand next turn.
96
+ Nirvana;Whenever you Scry, gain Block.
97
+ No Attack;You cannot play Attacks this turn.
98
+ No Draw;You cannot draw cards this turn.
99
+ No Block;You cannot gain Block from cards.
100
+ No Skills;You cannot play Skills this turn.
101
+ Noxious Fumes;At the start of your turn, apply Poison to ALL enemies.
102
+ Nullify Attack;Fully Blocks one Attack each turn.
103
+ Omega;At the end of your turn, deal damage to ALL enemies.
104
+ Omniscience;Your next card is played twice.
105
+ Painful Stabs;Whenever you receive attack damage from this enemy, add a Wound into your discard pile.
106
+ Panache;If you play more card this turn, deal damage to ALL enemies.
107
+ Mark;Whenever you play Pressure Points, loses HP.
108
+ Pen Nib;Your next Attack deals double damage.
109
+ Phantasmal;Deal Double Damage next turn.
110
+ Plated Armor;At the end of your turn, gain Block.
111
+ Poison;At the start of your turn, lose HP, then reduce Poison by 1.
112
+ Prime;Whenever you Channel an Orb, draw card.
113
+ Primitive;Whenever you play a Common card, draw card.
114
+ Rage;Whenever you play an Attack this turn, gain Block.
115
+ Rebound;The next card you play this turn is placed on top of your draw pile.
116
+ Regenerate;At the end of its turn, heals HP.
117
+ Regen;At the end of your turn, heal HP, then reduce Regen by 1.
118
+ Repair;At the end of combat, heal HP.
119
+ Retain Cards;At the end of your turn, you may retain card.
120
+ Retain Hand;Do not discard your hand at the end of this turn.
121
+ Ritual;At the end of its turn, gains Strength.
122
+ Rupture;Whenever you lose HP from a card, gain Strength.
123
+ Sadistic;Whenever you apply a debuff to an enemy, deal damage.
124
+ Serpentine;Immune to Potions.
125
+ Shackled;At the end of its turn, gains Strength.
126
+ Sharp Hide;Whenever you play an Attack, take damage.
127
+ Shifting;Upon losing HP, loses that much Strength until the end of the turn.
128
+ Shriek From Beyond;Whenever you play an Attack, discard a random card.
129
+ Skill Burn;For turn, whenever you play a Skill, Exhaust it.
130
+ Slow;Whenever you play a card, receives 10% more damage from Attacks this turn.
131
+ Split;When its HP is at or below 50%, will split into 2 smaller slimes with 's current HP.
132
+ Spore Cloud;On death, applies Vulnerable.
133
+ Stasis;On death, is returned to your hand.
134
+ Static Discharge;Whenever you receive attack damage, Channel Lightning.
135
+ Storm;Whenever you play a Power card, Channel Lightning.
136
+ Strength;Increases attack damage by this amount.
137
+ Strike Up;Cards containing Strike deal additional damage.
138
+ Study;At the end of your turn, shuffle Insight into your draw pile.
139
+ Surrounded;Receive 50% more damage if attacked from behind.
140
+ The Bomb;At the end of %1$s turns, deal %2$s damage to ALL enemies.
141
+ Thievery;steals Gold whenever it attacks.
142
+ Thorns;When attacked, deals damage back.
143
+ Thousand Cuts;Whenever you play a card, deal damage to ALL enemies.
144
+ Time Warp;Whenever you play cards, ends your turn and gains Strength.
145
+ Time Maze;Whenever you play cards, your turn is ended.
146
+ Tools Of The Trade;At the start of your turn, draw card and discard card.
147
+ Unawakened;This enemy hasn't awakened yet...
148
+ Vault;Receives damage at the start of your next turn.
149
+ Venomology;Poison grows stronger by instead of lowering each turn.
150
+ Vigor;Your next Attack deals additional damage.
151
+ Vulnerable;Receive 50% more damage from Attacks for turn.
152
+ Wave of the Hand;Whenever you gain Block, apply Weak to ALL enemies.
153
+ Weak;Attacks deal 25% less damage for turn.
154
+ Foresight;At the start of your turn, Scry .
155
+ Wraith Form;At the end of your turn, lose Dexterity.
156
+ Simmering Rage;Enter Wrath at the start of your turn.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stsdb
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Deterministic Slay the Spire card and relic query toolset
5
5
  Author: Taardisaa
6
6
  License: MIT
@@ -14,6 +14,7 @@ stsdb/data/card_upgrade.csv
14
14
  stsdb/data/hero.csv
15
15
  stsdb/data/play.csv
16
16
  stsdb/data/potion.csv
17
+ stsdb/data/power.csv
17
18
  stsdb/data/relic.csv
18
19
  stsdb/data/relic_availability.csv
19
20
  tests/test_stsdb.py
@@ -1,3 +0,0 @@
1
- from .core import query_card, query_potion, query_relic
2
-
3
- __all__ = ["query_card", "query_potion", "query_relic"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes