add unstable mod
| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
return {["disable_anims"]=false,["score_opt_id"]=3,["break_infinity"]="omeganum",}
 | 
					return {["disable_anims"]=true,["score_opt_id"]=3,["break_infinity"]="omeganum",}
 | 
				
			||||||
							
								
								
									
										21
									
								
								UnStable-main/LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2025 Kirbio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
					in the Software without restriction, including without limitation the rights
 | 
				
			||||||
 | 
					to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
				
			||||||
 | 
					copies of the Software, and to permit persons to whom the Software is
 | 
				
			||||||
 | 
					furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included in all
 | 
				
			||||||
 | 
					copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
				
			||||||
 | 
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
				
			||||||
 | 
					FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
				
			||||||
 | 
					AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			||||||
 | 
					LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
				
			||||||
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
 | 
					SOFTWARE.
 | 
				
			||||||
							
								
								
									
										23
									
								
								UnStable-main/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This mod adds a few new mechanics, along with the supported Jokers and Consumables and a few more extra stuff, while maintaining the Vanilla-esque aesthetic and gameplay.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The total additions are as follows:
 | 
				
			||||||
 | 
					- 75 New Jokers
 | 
				
			||||||
 | 
					- 8 New Ranks to discover during the gameplay
 | 
				
			||||||
 | 
					- New Consumable Type: Auxiliary Card
 | 
				
			||||||
 | 
					- Suit and Face Seal
 | 
				
			||||||
 | 
					- 5 new Enhancement
 | 
				
			||||||
 | 
					- 3 new Unhancement: Enhancement that has negative effects
 | 
				
			||||||
 | 
					- 5 Tarot and 9 Spectral Cards for supporting all new features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can also toggle each feature separately via the setting.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For more details, please visit the mod website at
 | 
				
			||||||
 | 
					https://kirbio.github.io/UnStableModSite/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Please note that this mod is designed and balanced to be played as a standalone mod.
 | 
				
			||||||
 | 
					It is possible to play it with other mods, however.
 | 
				
			||||||
 | 
					If you are playing it with other mods, please also get the [UnStableEX](https://github.com/kirbio/UnStableEX) expansion as well for cross-mod compatibility.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Enjoy!
 | 
				
			||||||
							
								
								
									
										9550
									
								
								UnStable-main/Unstable.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/auxiliary.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 60 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/auxiliary_undiscovered.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/back.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 16 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/booster.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 44 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/deck.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/enh_res.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 17 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/enh_slop.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/enh_slop_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 5.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/jokers.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 279 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/jokers_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/jokers_wip.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/modicon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 398 B  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 13 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/rank_ex2_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/rank_ex_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 26 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/sleeve.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/spectral.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 13 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/suit_seal.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/tarot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/1x/voucher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/auxiliary.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 76 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/auxiliary_undiscovered.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/back.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 21 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/booster.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 53 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/deck.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 10 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/enh_res.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 21 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/enh_slop.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/enh_slop_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/jokers.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 349 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/jokers_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/jokers_wip.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/modicon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 15 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 19 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/rank_ex2_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 39 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/rank_ex_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 37 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/sleeve.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 10 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/spectral.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 17 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/suit_seal.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 5.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/tarot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/2x/voucher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/sounds/heal.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/sounds/music_aux.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								UnStable-main/assets/sounds/poison.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										3
									
								
								UnStable-main/assets/sounds/source.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					http://www.kurage-kosho.info/battle.html
 | 
				
			||||||
 | 
					heal: magic04
 | 
				
			||||||
 | 
					poison: status02
 | 
				
			||||||
							
								
								
									
										25
									
								
								UnStable-main/config.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					    ["rank"] = {
 | 
				
			||||||
 | 
					        ["rank_21"] = true,
 | 
				
			||||||
 | 
					        ["rank_binary"] = true,
 | 
				
			||||||
 | 
					        ["rank_decimal"] = true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    ["enh"] = {
 | 
				
			||||||
 | 
					        ["enh_custom"] = true,
 | 
				
			||||||
 | 
					        ["enh_disenh"] = true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    ["gameplay"] = {
 | 
				
			||||||
 | 
					        ["edition_upgrade"] = true,
 | 
				
			||||||
 | 
					        ["seal_suit"] = true,
 | 
				
			||||||
 | 
					        ["c_aux"] = true,
 | 
				
			||||||
 | 
							["music"] = true,
 | 
				
			||||||
 | 
					        ["c_rebundant"] = true,
 | 
				
			||||||
 | 
					        ["new_spectrals"] = true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    ["joker"] = {
 | 
				
			||||||
 | 
					        ["vanilla"] = true,
 | 
				
			||||||
 | 
					        ["shitpost"] = true,
 | 
				
			||||||
 | 
					        ["alter"] = true,
 | 
				
			||||||
 | 
					        ["powerful"] = true,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										1634
									
								
								UnStable-main/localization/en-us.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1631
									
								
								UnStable-main/localization/pt_BR.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										15
									
								
								UnStable-main/manifest.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "name": "UnStable",
 | 
				
			||||||
 | 
					    "id": "UnStable",
 | 
				
			||||||
 | 
					    "version": "1.1.2c",
 | 
				
			||||||
 | 
					    "website_url": "https://github.com/kirbio/UnStable",
 | 
				
			||||||
 | 
					    "description": "Mod with a lot of new but vanilla-style mechanics. Contains new Jokers, consumables, and other stuff!",
 | 
				
			||||||
 | 
					    "prefix": "unstb",
 | 
				
			||||||
 | 
					    "author": ["Kirbio, RamChops Games"],
 | 
				
			||||||
 | 
					    "main_file": "Unstable.lua",
 | 
				
			||||||
 | 
					    "priority": 777,
 | 
				
			||||||
 | 
					    "badge_colour": "41c300",
 | 
				
			||||||
 | 
					    "dependencies": [
 | 
				
			||||||
 | 
					        "Steamodded (>=1.0.0~ALPHA-1318b)"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										183
									
								
								UnStable-main/override/jokerdisplay.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,183 @@
 | 
				
			||||||
 | 
					local jd = JokerDisplay.Definitions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--UnStable's Joker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--[[jd["j_unstb_lunar_calendar"] = {
 | 
				
			||||||
 | 
						text = {
 | 
				
			||||||
 | 
							{ text = "+" },
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "count", retrigger_type = "mult" },
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						text_config = { colour = G.C.SECONDARY_SET.Planet },
 | 
				
			||||||
 | 
						reminder_text = {
 | 
				
			||||||
 | 
							{ text = "(" },
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "lunar_suit"},
 | 
				
			||||||
 | 
							{ text = ")" }
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						extra = {
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								{ text = "(" },
 | 
				
			||||||
 | 
								{ ref_table = "card.joker_display_values", ref_value = "odds" },
 | 
				
			||||||
 | 
								{ text = ")" },
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						extra_config = { colour = G.C.GREEN, scale = 0.3 },
 | 
				
			||||||
 | 
						calc_function = function(card)
 | 
				
			||||||
 | 
							local count = 0
 | 
				
			||||||
 | 
							local text, _, scoring_hand = JokerDisplay.evaluate_hand()
 | 
				
			||||||
 | 
							if text ~= 'Unknown' then
 | 
				
			||||||
 | 
								for _, scoring_card in pairs(scoring_hand) do
 | 
				
			||||||
 | 
									if scoring_card:get_id() and scoring_card:is_suit(card.ability.extra.suit) then
 | 
				
			||||||
 | 
										count = count +
 | 
				
			||||||
 | 
											JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							card.joker_display_values.count = count
 | 
				
			||||||
 | 
							card.joker_display_values.odds = localize { type = 'variable', key = "jdis_odds", vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds_spawn } }
 | 
				
			||||||
 | 
							card.joker_display_values.lunar_suit = localize(card.ability.extra.suit, 'suits_plural')
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						style_function = function(card, text, reminder_text, extra)
 | 
				
			||||||
 | 
							if reminder_text and reminder_text.children[2] then
 | 
				
			||||||
 | 
								reminder_text.children[2].config.colour = lighten(G.C.SUITS[card.ability.extra.suit], 0.35)
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							return false
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jd["j_unstb_dragon_hoard"] = {
 | 
				
			||||||
 | 
						text = {
 | 
				
			||||||
 | 
							{ text = "+" },
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "mult", retrigger_type = "mult" },
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						text_config = { colour = G.C.MULT },
 | 
				
			||||||
 | 
						calc_function = function(card)
 | 
				
			||||||
 | 
							card.joker_display_values.mult = (G.consumeables and card.ability.extra.mult_rate * math.floor(#G.consumeables.cards/card.ability.extra.held_amount))or 0
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jd["j_unstb_card_dealer"] = {
 | 
				
			||||||
 | 
						text = {
 | 
				
			||||||
 | 
							{ text = "+" },
 | 
				
			||||||
 | 
							{ ref_table = "card.ability.extra", ref_value = "chips", retrigger_type = "mult" }
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						text_config = { colour = G.C.CHIPS },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jd["j_unstb_match_three"] = {
 | 
				
			||||||
 | 
						text = {
 | 
				
			||||||
 | 
							{ text = "+" },
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "mult", retrigger_type = "mult" },
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						text_config = { colour = G.C.MULT },
 | 
				
			||||||
 | 
						calc_function = function(card)
 | 
				
			||||||
 | 
							local count = 0
 | 
				
			||||||
 | 
							local text, _, scoring_hand = JokerDisplay.evaluate_hand()
 | 
				
			||||||
 | 
							if text ~= 'Unknown' then
 | 
				
			||||||
 | 
								--TODO: Check for suits in the adjacent card
 | 
				
			||||||
 | 
								for _, scoring_card in pairs(scoring_hand) do
 | 
				
			||||||
 | 
									if scoring_card:get_id() and scoring_card:is_suit(card.ability.extra.suit) then
 | 
				
			||||||
 | 
										count = count +
 | 
				
			||||||
 | 
											JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							card.joker_display_values.mult = count
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					}]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Vanilla Override Jokers
 | 
				
			||||||
 | 
					if unstb_global.config.joker.vanilla then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jd["j_fibonacci"].calc_function = function(card)
 | 
				
			||||||
 | 
							local mult = 0
 | 
				
			||||||
 | 
							local text, _, scoring_hand = JokerDisplay.evaluate_hand()
 | 
				
			||||||
 | 
							if text ~= 'Unknown' then
 | 
				
			||||||
 | 
								for _, scoring_card in pairs(scoring_hand) do
 | 
				
			||||||
 | 
									if not scoring_card.config.center.no_rank and (unstb_global.fibo[scoring_card.base.nominal] or scoring_card.base.value == 'Ace') then
 | 
				
			||||||
 | 
										mult = mult +
 | 
				
			||||||
 | 
											card.ability.extra.mult *
 | 
				
			||||||
 | 
											JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							card.joker_display_values.mult = mult
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') or getPoolRankFlagEnable('unstb_1') or getPoolRankFlagEnable('unstb_13') or getPoolRankFlagEnable('unstb_21') then
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(0,1," .. localize("Ace", "ranks") .. ",2,3,5,8,13,21)"
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(" .. localize("Ace", "ranks") .. ",2,3,5,8)"
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					jd["j_even_steven"].reminder_text = {
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "localized_text" },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					jd["j_even_steven"].calc_function = function(card)
 | 
				
			||||||
 | 
							local mult = 0
 | 
				
			||||||
 | 
							local text, _, scoring_hand = JokerDisplay.evaluate_hand()
 | 
				
			||||||
 | 
							if text ~= 'Unknown' then
 | 
				
			||||||
 | 
								for _, scoring_card in pairs(scoring_hand) do
 | 
				
			||||||
 | 
									if unstb_global.modulo_check(scoring_card, 2, 0) then
 | 
				
			||||||
 | 
										mult = mult +
 | 
				
			||||||
 | 
											card.ability.extra.mult *
 | 
				
			||||||
 | 
											JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							card.joker_display_values.mult = mult
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') or getPoolRankFlagEnable('unstb_12') then
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(12,10,8,6,4,2,0)"
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(10,8,6,4,2)"
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
					end	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jd["j_odd_todd"].reminder_text = {
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "localized_text" },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					jd["j_odd_todd"].calc_function = function(card)
 | 
				
			||||||
 | 
							local chips = 0
 | 
				
			||||||
 | 
							local text, _, scoring_hand = JokerDisplay.evaluate_hand()
 | 
				
			||||||
 | 
							if text ~= 'Unknown' then
 | 
				
			||||||
 | 
								for _, scoring_card in pairs(scoring_hand) do
 | 
				
			||||||
 | 
									if unstb_global.modulo_check(scoring_card, 2, 1) then
 | 
				
			||||||
 | 
										chips = chips +
 | 
				
			||||||
 | 
											card.ability.extra.chips *
 | 
				
			||||||
 | 
											JokerDisplay.calculate_card_triggers(scoring_card, scoring_hand)
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							card.joker_display_values.chips = chips
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_1') or getPoolRankFlagEnable('unstb_11') or getPoolRankFlagEnable('unstb_13') or getPoolRankFlagEnable('unstb_21') or getPoolRankFlagEnable('unstb_25') or getPoolRankFlagEnable('unstb_161')then
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(161,25,21,13,11," .. localize("Ace", "ranks") .. ",9,7,5,3,1)"
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								card.joker_display_values.localized_text = "(" .. localize("Ace", "ranks") .. ",9,7,5,3)"
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
					end	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Completely redefine Hack
 | 
				
			||||||
 | 
					jd["j_hack"] = {
 | 
				
			||||||
 | 
						reminder_text = {
 | 
				
			||||||
 | 
							{ ref_table = "card.joker_display_values", ref_value = "eligible_ranks" },
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						calc_function = function(card)
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') or getPoolRankFlagEnable('unstb_1') then
 | 
				
			||||||
 | 
								card.joker_display_values.eligible_ranks = "(0,1,2,3,4,5)"
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								card.joker_display_values.eligible_ranks = "(2,3,4,5)"
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						retrigger_function = function(playing_card, scoring_hand, held_in_hand, joker_card)
 | 
				
			||||||
 | 
							if held_in_hand then return 0 end
 | 
				
			||||||
 | 
							return (not playing_card.config.center.no_rank and unstb_global.hack[playing_card.base.value]) and
 | 
				
			||||||
 | 
								joker_card.ability.extra * JokerDisplay.calculate_joker_triggers(joker_card) or 0
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										131
									
								
								UnStable-main/override/suits.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,131 @@
 | 
				
			||||||
 | 
					local function print(message)
 | 
				
			||||||
 | 
					    sendDebugMessage('[Unstable_Suit] - '..(tostring(message) or '???'))
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local suit_group = {} --Store each suit group, and store a map of suits inside
 | 
				
			||||||
 | 
					local suit_group_map = {} -- A map pointing from suit name (key) directly to suit group name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					suit_group.suit_black = {}
 | 
				
			||||||
 | 
					suit_group.suit_red = {}
 | 
				
			||||||
 | 
					suit_group.no_smear = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function register_suit_group(type, suit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						print('Registering suit: '..suit..' with the type '..type)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    local suit_table = suit_group[type] or {}
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    suit_table[suit] = true
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    suit_group_map[suit] = type
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function get_suit_group(suit)
 | 
				
			||||||
 | 
					    return suit_group_map[suit] or "no_smear"
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					register_suit_group("suit_black", "Spades")
 | 
				
			||||||
 | 
					register_suit_group("suit_black", "Clubs")
 | 
				
			||||||
 | 
					register_suit_group("suit_red", "Hearts")
 | 
				
			||||||
 | 
					register_suit_group("suit_red", "Diamonds")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--print(inspectDepth(suit_group))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Modded Suits Code in UnStableEX
 | 
				
			||||||
 | 
					--register_suit_group("no_smear", "Inks_Inks")
 | 
				
			||||||
 | 
					--register_suit_group("no_smear", "Inks_Color")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local card_issuit_ref = Card.is_suit
 | 
				
			||||||
 | 
					function Card:is_suit(suit, bypass_debuff, flush_calc, bypass_seal) --Adds one more argument: bypass_seal. true if the calculation bypass the seal on the card
 | 
				
			||||||
 | 
						--Modified from SMODS-patched version of is_suit, completely re-implemented to supports the new smear system
 | 
				
			||||||
 | 
						if flush_calc then
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							--Has seal, is modded seal, and has suit_seal property
 | 
				
			||||||
 | 
							if not bypass_seal and self.seal and SMODS.Seals[self.seal] and SMODS.Seals[self.seal].suit_seal and not self.debuff then
 | 
				
			||||||
 | 
								--returns true immediately if the suit is equal
 | 
				
			||||||
 | 
								if SMODS.Seals[self.seal].suit_seal == suit then
 | 
				
			||||||
 | 
									return true
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					        if self.ability.effect == 'Stone Card' or self.config.center.no_suit then
 | 
				
			||||||
 | 
					            return false
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        if (self.ability.name == 'Wild Card' or self.config.center.any_suit) and not self.debuff then
 | 
				
			||||||
 | 
					            return true
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--If the suit is equal, returns immediately
 | 
				
			||||||
 | 
							if self.base.suit == suit then
 | 
				
			||||||
 | 
								return true
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--If smeared joker exists, and is not in no_smear group
 | 
				
			||||||
 | 
					        if next(SMODS.find_card('j_smeared')) and not suit_group.no_smear[suit] then	
 | 
				
			||||||
 | 
								--Has seal, is modded seal, and has suit_seal property
 | 
				
			||||||
 | 
								if not bypass_seal and self.seal and SMODS.Seals[self.seal] and SMODS.Seals[self.seal].suit_seal and not self.debuff then
 | 
				
			||||||
 | 
									local targetGroup = get_suit_group(SMODS.Seals[self.seal].suit_seal)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									--returns true immediately if the suit is in the same suit group
 | 
				
			||||||
 | 
									if suit_group[targetGroup][suit] then
 | 
				
			||||||
 | 
										return true
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								local targetGroup = get_suit_group(self.base.suit)
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								--returns true if the suit is in the same suit group
 | 
				
			||||||
 | 
								if suit_group[targetGroup][suit] then
 | 
				
			||||||
 | 
									return true
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--fallback - go back to the main reference, in case other mood hook it as well
 | 
				
			||||||
 | 
							local fallback_res = card_issuit_ref(self, suit, bypass_debuff, flush_calc)
 | 
				
			||||||
 | 
							return fallback_res
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if self.debuff and not bypass_debuff then return end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--Has seal, is modded seal, and has suit_seal property
 | 
				
			||||||
 | 
							if not bypass_seal and self.seal and SMODS.Seals[self.seal] and SMODS.Seals[self.seal].suit_seal then
 | 
				
			||||||
 | 
								--returns true immediately if the suit is equal
 | 
				
			||||||
 | 
								if SMODS.Seals[self.seal].suit_seal == suit then
 | 
				
			||||||
 | 
									return true
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					        if self.ability.effect == 'Stone Card' or self.config.center.no_suit then
 | 
				
			||||||
 | 
					            return false
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        if self.ability.name == 'Wild Card' or self.config.center.any_suit then
 | 
				
			||||||
 | 
					            return true
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--If the suit is equal, returns immediately
 | 
				
			||||||
 | 
							if self.base.suit == suit then
 | 
				
			||||||
 | 
								return true
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							--If smeared joker exists, and is not in no_smear group
 | 
				
			||||||
 | 
					        if next(SMODS.find_card('j_smeared')) and not suit_group.no_smear[suit] then
 | 
				
			||||||
 | 
					            --Has seal, is modded seal, and has suit_seal property
 | 
				
			||||||
 | 
								if not bypass_seal and self.seal and SMODS.Seals[self.seal] and SMODS.Seals[self.seal].suit_seal then
 | 
				
			||||||
 | 
									local targetGroup = get_suit_group(SMODS.Seals[self.seal].suit_seal)
 | 
				
			||||||
 | 
									--returns true immediately if the suit is in the same suit group
 | 
				
			||||||
 | 
									if suit_group[targetGroup][suit] then
 | 
				
			||||||
 | 
										return true
 | 
				
			||||||
 | 
									end
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								local targetGroup = get_suit_group(self.base.suit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								--returns true if the suit is in the same suit group
 | 
				
			||||||
 | 
								if suit_group[targetGroup][suit] then
 | 
				
			||||||
 | 
									return true
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					        --fallback - go back to the main reference, in case other mood hook it as well
 | 
				
			||||||
 | 
							return card_issuit_ref(self, suit, bypass_debuff, flush_calc)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										183
									
								
								UnStable-main/override/vanilla_joker.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,183 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Rank
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Fibonacci
 | 
				
			||||||
 | 
					--Operates from a table, other mods can register more number in this table if needed
 | 
				
			||||||
 | 
					--Currently supports up to 144
 | 
				
			||||||
 | 
					unstb_global.fibo = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Register more Fibonacci numbers, accepts a list of number
 | 
				
			||||||
 | 
					function unstb_global.register_fibonacci(number_list)
 | 
				
			||||||
 | 
						for i = 1, #number_list do
 | 
				
			||||||
 | 
							unstb_global.fibo[number_list[i]] = true
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unstb_global.register_fibonacci({0, 1, 2, 3, 5, 8, 13,	21,	34,	55,	89,	144})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Fibonacci looks for a *nominal* chip of the rank (with special hardcoded case accounted for Ace)
 | 
				
			||||||
 | 
					SMODS.Joker:take_ownership('fibonacci', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config = { extra = { mult = 8} },
 | 
				
			||||||
 | 
						loc_vars = function(self, info_queue, card)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							local key = self.key
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') or getPoolRankFlagEnable('unstb_1') or getPoolRankFlagEnable('unstb_21') then
 | 
				
			||||||
 | 
								key = self.key..'_ex'
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							return { key = key, vars = {card and card.ability.extra.mult or self.config.extra.mult} }
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						calculate = function(self, card, context)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if context.individual and context.cardarea == G.play then
 | 
				
			||||||
 | 
								local nominal = context.other_card.base.nominal
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								if not context.other_card.config.center.no_rank and (unstb_global.fibo[nominal] or context.other_card.base.value == 'Ace') then
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
									  mult = card.ability.extra.mult,
 | 
				
			||||||
 | 
									  card = card
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									--Failsafe for mod compat
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
										mult = 0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					}, true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Odd Todd and Even Steven
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--A special function written to specifically looking for rank's *nominal* + special case for ??? (Triggers everything)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Table of a true 'face' rank (TODO: Might open it up to allow other mods to register more? Not sure yet)
 | 
				
			||||||
 | 
					unstb_global.face_rank = {Jack = true, Queen = true, King = true}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Check for a modulo and remainder of the card's rank - used for both odd and even check
 | 
				
			||||||
 | 
					function unstb_global.modulo_check(card, mod, remainder)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if card.config.center.no_rank then
 | 
				
			||||||
 | 
							return false
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						local rank = card.base.value
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						if rank == 'unstb_???' then -- ??? Card
 | 
				
			||||||
 | 
							return true
 | 
				
			||||||
 | 
						elseif unstb_global.face_rank[rank] then -- "True" Face Card (aka bypass Pareidolia)
 | 
				
			||||||
 | 
							return false
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						return (card.base.nominal%mod == remainder)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SMODS.Joker:take_ownership('odd_todd', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config = { extra = { chips = 31} },
 | 
				
			||||||
 | 
						loc_vars = function(self, info_queue, card)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							local key = self.key
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_1') or getPoolRankFlagEnable('unstb_21') then
 | 
				
			||||||
 | 
								key = self.key..'_ex'
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							return { key = key, vars = {card and card.ability.extra.chips or self.config.extra.chips} }
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						calculate = function(self, card, context)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if context.individual and context.cardarea == G.play then
 | 
				
			||||||
 | 
								if unstb_global.modulo_check(context.other_card, 2, 1) then
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
									  chips = card.ability.extra.chips,
 | 
				
			||||||
 | 
									  card = card
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									--Failsafe for mod compat
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
										chips = 0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					}, true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SMODS.Joker:take_ownership('even_steven', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config = { extra = { mult = 4} },
 | 
				
			||||||
 | 
						loc_vars = function(self, info_queue, card)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							local key = self.key
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') then
 | 
				
			||||||
 | 
								key = self.key..'_ex'
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							return { key = key, vars = {card and card.ability.extra.mult or self.config.extra.mult} }
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						calculate = function(self, card, context)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							if context.individual and context.cardarea == G.play then
 | 
				
			||||||
 | 
								if unstb_global.modulo_check(context.other_card, 2, 0) then
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
									  mult = card.ability.extra.mult,
 | 
				
			||||||
 | 
									  card = card
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									--Failsafe for mod compat
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
										mult = 0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					}, true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Hack
 | 
				
			||||||
 | 
					--Operates from a table, other mods can register more number in this table if needed
 | 
				
			||||||
 | 
					unstb_global.hack = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--Register ranks that triggers Hack
 | 
				
			||||||
 | 
					function unstb_global.register_hack(rank_list)
 | 
				
			||||||
 | 
						for i = 1, #rank_list do
 | 
				
			||||||
 | 
							unstb_global.hack[rank_list[i]] = true
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unstb_global.register_hack({'unstb_0', 'unstb_1', '2', '3', '4', '5'})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SMODS.Joker:take_ownership('hack', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config = { extra = 1 },
 | 
				
			||||||
 | 
						loc_vars = function(self, info_queue, card)
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							local key = self.key
 | 
				
			||||||
 | 
							if getPoolRankFlagEnable('unstb_0') or getPoolRankFlagEnable('unstb_1') then
 | 
				
			||||||
 | 
								key = self.key..'_ex'
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							return { key = key, vars = {card and card.ability.extra or self.config.extra} }
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						calculate = function(self, card, context)
 | 
				
			||||||
 | 
							if context.cardarea == G.play and context.repetition and not context.repetition_only then
 | 
				
			||||||
 | 
							  if not context.other_card.config.center.no_rank and unstb_global.hack[context.other_card.base.value] then
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
									  message = 'Again!',
 | 
				
			||||||
 | 
									  repetitions = card.ability.extra,
 | 
				
			||||||
 | 
									  card = context.blueprint_card or card
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
							  end
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					}, true)
 | 
				
			||||||
							
								
								
									
										21
									
								
								UnStableEX-main/LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2025 Kirbio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
					in the Software without restriction, including without limitation the rights
 | 
				
			||||||
 | 
					to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
				
			||||||
 | 
					copies of the Software, and to permit persons to whom the Software is
 | 
				
			||||||
 | 
					furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included in all
 | 
				
			||||||
 | 
					copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
				
			||||||
 | 
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
				
			||||||
 | 
					FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
				
			||||||
 | 
					AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			||||||
 | 
					LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
				
			||||||
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
 | 
					SOFTWARE.
 | 
				
			||||||
							
								
								
									
										20
									
								
								UnStableEX-main/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
					@ -0,0 +1,20 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Expansion and Cross-mod Compatibility for UnStable.
 | 
				
			||||||
 | 
					Mostly focused on Vanilla-like content mod.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					It currently only contains basic cross-mod support to make new features work properly.
 | 
				
			||||||
 | 
					This mod is very early in development and will continue to add more support and other content in the future.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Limitation:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Currently, it only supports the following mods: Bunco, Six Suits, Ink and Colors, Familiar, and Ortalab.
 | 
				
			||||||
 | 
					Any other mods that have Joker or Consumable effects that change the rank of the card will most likely break on all new ranks added by UnStable.
 | 
				
			||||||
 | 
					Any Enhancement that changes the appearance with the card's base suit will use a generic placeholder graphic for any non-basegame additional suit.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Please note that this is not a standalone mod, you need the base [UnStable](https://github.com/kirbio/UnStable/tree/main) as well.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Other cross-mod contents will show up only if you have the supported mod installed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For more information, please visit the mod's website here:
 | 
				
			||||||
 | 
					https://kirbio.github.io/UnStableModSite/ex.html
 | 
				
			||||||
							
								
								
									
										1961
									
								
								UnStableEX-main/UnstableEX.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/enh_res.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 48 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/enh_slop.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/enh_slop_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/enh_slop_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 14 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/jokers_wip.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/modicon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 484 B  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex2_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex2_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 26 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/bunco/rank_ex_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 28 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/cardsauce/rank_ex2_cs.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 28 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/cardsauce/rank_ex_cs.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 27 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/default/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/default/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/inkscolor/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/inkscolor/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/minty/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/minty/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/mtj/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/mtj/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/mtj/rank_ex2_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/mtj/rank_ex_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/sixsuits/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex/sixsuits/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex2_multi.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/1x/rank_ex_multi.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/enh_res.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 61 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/enh_slop.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/enh_slop_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 16 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/enh_slop_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/jokers_wip.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/modicon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 15 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex2_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 19 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex2_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 46 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex_hc.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 20 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								UnStableEX-main/assets/2x/rank_ex/bunco/rank_ex_hc_b.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 46 KiB  |