packages = ["micropip"]
import asyncio
from js import document
#async def install_and_run():
import micropip
await micropip.install("numpy")
import numpy as np
import random
#asyncio.ensure_future(install_and_run())
#document.getElementById("resultDisplay").innerText = []
result_box = document.getElementById("resultDisplay")
#debug_Box = document.getElementById("debugBox")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Above this line is not updated from the main python code file
ItemTags = {
'':{''},
"ArcaneBell" : {"BattleStart", "Unique", "Instrument"}, #Decrease all cooldowns by 1... Maybe just "activate" cooldown items
"ArcaneBellS" : {"BattleStart", "Unique", "Instrument"},
"BootsOfTheHero" : {}, #Its just base stats
"ChampionsArmor" : {}, #Stats
"CherryBomb" : {"BattleStart", "Bomb", "Food"}, #Deals 1 damage two times
"CitrineEarring" : {"EveryOtherTurn", "Jewelry", "Citrine"}, #Gain 1 Speed every other turn
"CitrineRing" : {"BattleStart", "Jewelry", "Unique", "Ring", "Citrine"}, #Deal damage = to speed
"ClearspringFeather" : {"BattleStart", "Water"}, #Decrease a random status effect by 1 and give it to the foe
"ClearspringWatermelon" : {"BattleStart", "Exposed", "Wounded"}, #Decrease a random status effect by 1
"CrackedWhetstone" : {"FirstTurnStrike", "Stone"}, #Gain 2 attack for the first turn only
"DeviledEgg" : {"Unique", "Sanguine"}, #Does Nothing
"DoubleplatedArmor" : {"Exposed"}, #Gain 3 armor
"EmeraldCrown" : {"Jewelry", "Emerald"},
"EmeraldEarring" : {"EveryOtherTurn", "Jewelry", "Emerald"}, #Restore 1 hp
"EmeraldRing" : {"BattleStart", "Jewelry", "Ring", "Emerald"}, #Restore 3 hp
"EmergencyShield" : {"BattleStart"}, #Less speed than enemy, give 5 armor
"FrostbiteGauntlet" : {"BattleStart", "Water"}, #Give the enemy 1 Freeze
"FrostbiteTrap" : {"Wounded", "Water"}, #Give the enemy 2 freeze
"GraniteEgg" : {"Unique", "Stone"}, #Does Nothing
"GraniteTome" : {"Stone", "Cooldown", "Tome"}, #CD 4: Gain 6 armor
"HolyShield" : {}, #Stats
"HolyTome" : {"Cooldown", "Tome"}, #CD 6: Gain 3 attack
"HornedHelmet" : {"BattleStart"}, #Gain 1 thorn
"IceblockShield" : {"Unique", "Water", "BattleStart"}, #Self freeze 2 on battlestart
"IronstoneBracelet" : {"Stone", "Unique", "PreFoeStrike"}, #Foe strikes deal 1 less damage if you have armor, else +1
"KnightsArmor" : {}, #Stats
"LeatherBelt" : {}, #Stats
"LeatherGlove" : {}, #Its just base stats
"LeatherVest" : {}, #Its just base stats
"LifebloodHelmet" : {"Unique", "FirstTurnPostStrike"}, #On First turn restore hp = damage from strikes Could maybe be "FirstTurnOnHit" instead??
"LiferootGauntlet" : {"BattleStart", "Wood"}, #Gain 1 Regen
"LiferootTome" : {"Wood", "Cooldown", "Tome"}, #CD 4: Gain 3 regen
"LightspeedPotion" : {"BattleStart", "Unique", "Potion"}, #BatStart Restore HP = Speed
"LightspeedElixir" : {"BattleStart", "Unique", "Potion"}, #BatStart gain max hp and Restore HP = Speed
"LooseChange" : {}, #Gives money every night Way too complex to ask ppl for lol
"MusclePotion" : {"Potion", "OnHit"}, #Every 3 strikes gain 1 attack
"MuscleElixir" : {"Potion", "OnHit"}, #Every 3 strikes gain 1 attack, 1 armor, and 1 speed
"PetrifyingFlask" : {"Wounded", "Stone", "Potion"}, #Wounded: Gain 10 armor and 2 stun
"PetrifyingElixir" : {"Wounded", "Stone", "Potion"}, #Wounded: Gain 10 armor and stun everyone for 2 turns
"PowderPlate" : {"BattleStart"}, #Give Foe 2 powder
"PurelakeHelmet" : {"BattleStart", "Water"}, #BatStart: Gain 1 Purity
"RedwoodCloak" : {"BattleStart", "Wood"}, #If on BatStart hp not full, restore 2
"RedwoodHelmet": {"Exposed", "Wood"}, #Restore 3 hp on exposed
"RedwoodRoast" : {"Wood", "Food"},
"RoyalHorn" : {"Wounded", "Unique", "Instrument"}, #Wounded: Gain 2 gold symphony
"RoyalHornS" : {"Wounded", "Unique", "Instrument"}, #Wounded: Gain 2 gold symphony
"RubyCrown" : {"Jewelry", "Ruby"},
"RubyEarring" : {"EveryOtherTurn", "Jewelry", "Ruby"}, #Deal 1 damage eot
"RubyRing" : {"BattleStart", "Jewelry", "Ring", "Ruby"}, #Gain 2 attack and take 3 damage
"RustyRing" : {"BattleStart", "Ring"}, #Give the foe 1 acid
"SaffronFeather" : {"TurnStart"}, #Convert 1 speed to 2 hp even if cannot heal? ye
"SanguineTome" : {"Unique", "Sanguine", "Cooldown", "Tome"}, #CD 6: Restore HP to full
"SapphireCrown" : {"Jewelry", "Sapphire"},
"SapphireEarring" : {"EveryOtherTurn","Jewelry", "Sapphire"}, #Gain 1 armor eot
"SapphireRing" : {"BattleStart", "Jewelry", "Ring", "Sapphire"}, #Steal 2 armor from foe (if possible)
"SerpentLyre" : {"Exposed", "Unique", "Instrument"}, #Give the foe 3 poison
"SerpentLyreS" : {"Exposed", "Unique", "Instrument"}, #Give the foe 3 poison
"ShieldOfTheHero" : {}, #Its just base stats
"SilverscaleFish" : {"Exposed", "Food"}, #Give the foe 1 riptide
"SilverscaleTome" : {"Cooldown", "Tome"}, #CD 3: Give the foe 2 riptide
"SlimeArmor" : {"BattleStart"}, #Gain 1 acid
"SoapStone" : {"FirstTurn"}, #Spend 2 speed to gain 4 temp attack
"SourLemon" : {"BattleStart", "Food"}, #Gain 1 acid
"SpinyChestnut" : {"BattleStart", "Food"}, #Gain 3 thorns
"SquiresArmor" : {}, #Stats
"StormcloudTome" : {"Cooldown", "Tome"}, #CD 4: Stun foe 1 turn
"SwiftstrikeBelt" : {"BattleStart"}, #Take 3 damage gain 1 strike on next turn
"TreebarkEgg" : {"Unique", "Wood"}, #Does Nothing
'VampiricWine' : {"Wounded", "Sanguine", "Food"}, #Wounded restore 4 hp
"VenomousFang" : {"FirstTurnOnHit"}, #First Turn: Give foe 2 poison OH
"WeaverShield" : {"BattleStart"}, #If you have 0 base armor, gain 4 armor
"WetEgg" : {"Water", "Unique"}, #Does Nothing
"ArcaneGauntlet" : {"Unique"}, #All cooldowns are halved
"ArcaneLens" : {"Unique"}, #If you have exactly 1 tome, trigger it thrice
"ArcaneShield" : {"CooldownTrigger"}, #When a countdown effect triggers, gain 3 armor
"ArmorRegrowth" : {"SelfArmorLose"}, #Need a new thingy
"BasiliskScale" : {"BattleStart"}, #BatStart: Gain 5 armor and 5 poison
"BigBoom" : {"BattleStart", "Bomb"}, #If Foe is at or below 50%, deal 20 damage
"BlackbriarGauntlet" : {"ArmorLose"}, #Gain 2 thorns per armor lost from foe's first strike
"BlackbriarRose" : {"Unique", "HPRestore", "HPRestoreS"}, #Whenever you restore hp gain 2 thorns
'BlacksmithBond' : {'Unique'},
"BlastcapArmor" : {"Bomb", "Exposed"}, #Take 5 Damage
'BloodChain': {'Unique', "Sanguine"},
"BombBag" : {"BattleStart", "Exposed", "Wounded"}, #Spend 3 speed to retrigger a random bomb
"BrambleBelt" : {"BattleStart"}, #Gain 2 thorns and give the foe 1 more strike
"BrambleBuckler" : {"TurnStart"}, #Convert 1 armor to 2 thorns
"BrambleTalisman" : {"GainThorns", "Unique"}, #Whenever you gain thorns, gain 1 armor
"BrambleVest" : {"ThornsLose"}, #The first time you lose thorns, restore hp = to lost thorns
"RazorvineTalisman" : {"Unique", "GainThorns"}, #When gain thorns, gain another one: ~~~~~~~~~~~~Might need to add GainThornsS
"BrittlebarkBuckler" : {"AfterFoeFirstStrike", "Wood"}, #After Foe's First Strike take damage then lose all armor Probably can just put it as a check directly in the strike calc
"CausticTome" : {"Cooldown", "Tome"}, #CD 3: Give the foe 3 acid, unless they have no armor, then give 3 poison
"ChainmailCloak" : {"TurnStart"}, #If you have armor restore 2 hp
"ClearspringCloak" : {"Exposed"}, #Remove all status effects and gain 1 armor per stack removed
"ClearspringOpal" : {"TurnStart", "Water"}, #TS: Spend 1 speed to decrease a random status effect by 1
"ClearspringRose" : {"HPRestore", "Unique", "Water", "HPRestoreS"}, #Whenever you restore hp, decrease a random status effect by 1.
"Cookbook" : {"Tome"}, #This might not count idk
"CorrodedBone" : {"BattleStart"}, #Convert 50% of Enemies hp into Armor. Rounded down?
"CrackedBouldershield" : {"Exposed"}, #Gain 7 armor
"CrimsonFang" : {"BattleStart", "Sanguine"}, #If your hp is full, lose 5 hp and gain 2 strikes
"DoubleExplosion" : {"SecondNonWeapon"}, #The 2nd time you deal nonweapon damage a turn, deal 3 damage.
#Maybe can run the "TakeDamage" tag and then add a toggle if its the second trigger. Then reset toggle at end of turn.
"DoubleplatedVest" : {"ThirdTakeDamage", "Unique"}, #Every 3rd time you take damage, gain 2 armor.
"EnergyDrain" : {"BattleStart", "Unique"}, # steal 5 foe's speed
"ExplosivePowder" : {"BombBonus", "Unique"}, #All bomb items deal 1 more damage
"ExplosiveSurprise" : {"Exposed", "Bomb"}, #Deal 6 damage
"FeatherweightArmor" : {"GainSpeed"}, #Gain 1 armor for every gained speed
"FeatherweightGauntlet" : {"FirstTurn"}, #Spend 2 speed to gain 4 attack temp
"FeatherweightGreaves" : {"TurnStart"}, #If you have 0 speed, gain 2 speed
"FeatherweightHelmet" : {"BattleStart"}, #Spend 2 armor and gain 3 speed and 1 attack
"FeatherweightWings": {"BattleStart", "Unique"}, #If you have less speed than the foe, gain attack = speed
"FirecrackerBelt" : {"Exposed", "Bomb"}, #Deal 1 damage 3 times
"FlameburstTome" : {"Cooldown", "Tome"}, #CD 4: Deal 4 and reset cooldown
"ForgeGauntlet" : {"BattleStart"}, #Give the foe 5 armor
"FortifiedGauntlet" : {"TurnStart"}, #If you have armor, gain an armor
"FriendshipBracelet" : {"BattleStart"}, #Battle Start: The enemy loses 1 attack
"FrostbiteArmor" : {"Water", "AfterFoeFirstStrike"}, #Enemy's first strike does 2x, then give them 4 freeze
"FrostbiteCurse" : {"BattleStart", "Water"}, #Give yourself and foe 5 freeze each
"FrostbiteGreaves": {"LoseSpeed"}, #Whenever you lose speed, give the foe 1 freeze
"GoldRing" : {"BattleStart", "Jewelry", "Ring"}, #Gain 1 gold
"GraniteCrown" : {"BattleStart", "Stone", "Unique"}, #Gain max HP = to Base armor
"GraniteFungi" : {"TurnEnd", "Stone"}, #Gain 2 armor to you and foe
"HeartshapedAcorn" : {"BattleStart", "Unique", "Wood"}, #If you have 0 base armor set HP to MaxHP
"HeartshapedPotion" : {"HP1","Sanguine", "Potion", "Unique"}, #When reaching exactly 1 hp first time restore HP to MaxHP (Need to add every that loses hp)
"HeartshapedElixir" : {"HP5","Sanguine", "Potion", "Unique"}, #When reaching below 5 hp first time restore HP to MaxHP (Need to add every that loses hp)
"HerosCrossguard" : {"Unique", "OnHitTriggerFT"}, #FT: On Hit trigger twice??
"IceSpikes" : {"TurnStart", "Water"}, #If you have freeze, gain 5 thorns
"IceTomb" : {"TurnStart", "Water"}, #If you have armor, gain 3 armor and 1 freeze.
"ImpressivePhysique" : {"Exposed"}, #Exposed: Stun the foe for 1 turn
"IronRose" : {"HPRestore", "Unique", "HPRestoreS"}, #Whenever you restore hp, gain 1 armor
"IronShrapnel" : {"BattleStart", "Bomb"}, #Deal 3 damage to foe, if they have no armor deal double
"IronstoneSandals" : {"PreStrike", "Stone"}, #Gain 2 attack when have armor
"KindlingBomb" : {"BattleStart", "Bomb"}, #Deal 1 damage, then give the next bomb a temp damage increase.
"LeatherBoots" : {"BattleStart"}, #More speed than foe, gain 2 attack
"LeatherWaterskin" : {"Exposed", "Unique"}, #Gain 2 purity, repeat for each equipped water item
"LightningBottle" : {"BattleStart", "Potion"}, #Stun yourself for 1 turn
"LightningElixir" : {"BattleStart", "Unique", "Potion"}, #Stun yourself for 2 turns
"MarbleMirror" : {"BattleStart", "Stone", "Unique"}, #Gain armor = foes current armor
"MarshlightLantern" : {"Exposed"}, #Lose 3 hp and gain 8 armor
"MoonlightCrest" : {"TurnStart", "Unique"}, #If you are below 50% hp, gain 1 regen
"MuscleGrowth" : {"PreStrike", "Wood"}, #While you have regen, temp gain 3 attack
"MushroomBuckler" : {"PreFoeStrike"}, #If you have poison, foe strikes do 1 less damage
"NervePoison" : {"Potion", 'GainPoison'}, #The first time the foe gains poison, give them 1 stun
"NerveElixir" : {"Potion", 'GainPoison', "Unique"}, #The first time the foe gains poison, give them 3 stun
"OakHeart" : {"Unique", "Wood"}, #Effect is before battles
"OreHeart" : {"BattleStart", "Unique", "Stone"}, #Gain 3 armor per equipped stone item
"PiercingThorns" : {"ThornMultArmor"}, #Thorns do 2x damage to armor
"PineconeBreastplate" : {"BattleStart", "Wood"}, #If HP = max HP at BatStart then gain PineconeBreastplateTS item
"PineconeBreastplateTS" : {"TurnStart", "Wood"}, #Gain 1 thorn at turn start
"PlatedGreaves" : {"Exposed"}, #Convert 3 speed to 9 armor
"PlatedShield" : {"Unique"}, #The first time you gain armor, double it.
"PoisonousMushroom" : {"TurnStart", "Food"}, #Gain 1 poison
"PowderKeg" : {"Unique"}, #BatStar: If you only have 1 bomb, it triggers 3 times
"PurelakeArmor" : {"Exposed", "Water"}, #Exposed: Remove 1 purity to gain 5 armor
"PurelakePotion" : {"BattleStart", "Unique", "Water", "Potion"}, #Remove all armor and gain 3 purity
"PurelakeElixir" : {"BattleStart", "Unique", "Water", "Potion"}, #Lose 5 armor and gain 5 purity
"PurelakeTome" : {"Cooldown", "Tome", "Water"}, #CD 3: if you have purity, remove 1. Else gain 1. Reset cd
"RiverflowTalisman" : {"GainStatus", "Unique", "Water"}, #Whenever you gain a status, gain 1 more
"RiverflowViolin" : {"Exposed", "Unique", "Instrument", "Water"}, #Gain 4 armor Sym
"RiverflowViolinS" : {"Exposed", "Unique", "Instrument", "Water"}, #Gain 4 armor
"RoyalHelmet" : {"Exposed"}, #Gain 10 armor IF you have more than 20 gold
"RustedPlate" : {"AcidDamage"}, #If the foe loses armor to acid, you gain that armor
"SaltcrustedCrown" : {"BattleStart"}, #gain 1 riptide
"SanguineRose" : {"HPRestore", "Unique", "Sanguine"}, #Whenever you restore 1 hp restore another (This restore doesnt count)
"SilverAnchor" : {"LoseSpeed"}, #Whenever you lose speed, give the foe 1 riptide
"SilverscaleArmor" : {"RiptideDamage"}, #Whenever riptide triggers, gain 2 armor
"SilverscaleGreaves" : {"BattleStart"}, #If you have more speed, give foe 2 riptide
"SinfulMirror" : {"Wounded", "Unique"}, #Remove all your purity
"SlimeBomb" : {"FoeExposed", "Unique", "Bomb"}, #Remove all their acid, and deal 2 damage per acid removed
"SlimeBooster" : {"BattleStart"}, #Convert 1 acid to 2 attack
"SlimeHeart" : {"Wounded", "Unique"}, #Remove all acid and restore 2 hp per acid removed
"SlimePotion" : {"Wounded", "Potion", "Unique"}, #Gain armor = missing hp and gain 5 acid.
"SlimeElixir" : {"Wounded", "Potion", "Unique"}, #Gain armor = max hp and gain 5 acid.
"SmokeBomb" : {"BattleStart", "Bomb"}, #If less speed than foe, then gain 3 speed and give foe 3 powder
"SpiralShell" : {"TurnStart"}, #If Stunned, give foe 1 riptide
"SpiritualBalance" : {"BattleStart"}, #If your speed = attack. gain 3 attack
"StillwaterPearl" : {"Unique", "RiptideTriggers"}, #Riptide can trigger twice per turn
"StoneSteak" : {"BattleStart", "Stone", "Food"}, #If HP = MaxHP, gain 5 armor
"StormcloudArmor" : {"BattleStart"}, #If you have more speed than armor, stun foe for 2 turns
"StormcloudCurse" : {"BattleStart"}, #Stun yourself and the foe for 2 turns
"SunlightCrest" : {"TurnStart"}, #If you're above 50% hp, lose 3 hp and gain 1 attack
"SwiftstrikeCrown" : {"BattleStart", "Unique"}, #Spend 5 speed to perm gain 1 extra strike~~~~~Adds x2 when having the specifc weapon
"TempestBreastplate" : {"Exposed"}, #Gain speed = base armor
"ThornRing" : {"BattleStart", "Ring", "Unique"}, #Take 1 damage and gain thorns equal to missing hp
"ThunderCloud" : {"Wounded", "Unique"}, #On Wounded: stun foe for 3
"ToxicAlgae" : {"FirstRiptide"}, #Give the foe 5 poison
"ToxicRose" : {"HPRestore", "Unique", "HPRestoreS"}, #Whenever you restore hp, give foe 1 poison
"TwistedRoot" : {"Exposed", "Unique", "Wood"}, #Gain 1 regen per equipped wood
"VampiresTooth" : {"Unique"}, #If you have exactly 1 sanguine item, its healing is doubled
"VampiricStasis" : {"Sanguine", "SkipStrike"}, #Whenever you skip your strike, restore 3 HP
"ViperExtract" : {"Potion", "GainPoison"}, #First time foe gains poison, give them 3 more
"ViperElixir" : {"Potion", "GainPoison", "Unique"}, #First time foe gains poison, give them 9 more
"AcidMutation" : {"BattleStart", "PreStrike"}, #gain 1 Acid
"AcidicWitherleaf" : {"BattleStart"}, #Give the foe acid = to your speed
"AssaultGreaves" : {"TakeDamage", "TakeDamageS", "Unique"}, #Deal 1 damage
"BlackbriarArmor" : {"TakeDamage", "TakeDamageS", "Unique"}, #Whenever you take damage, gain 2 thorns
"BloodstoneRing" : {"BattleStart", "Sanguine", "Ring"}, #BS: Gain 5 max hp and restore 5 hp
"BrittlebarkArmor" : {"TakeDamage", "Wood"}, #Take another damage
"CactusCap" : {"ThornMultNoArmor", "Unique"}, #Convert armor to thorns
"ChainmailArmor" : {"Wounded"}, #RegainBaseArmor MIGHT BE IMPLIMENTED INCORRECTLY
"CitrineGemstone" : {"Unique", "Jewelry", "Citrine"}, #Invert base speed
"ClearspringDuck" : {"TurnStart", "Unique", "Water"}, #Gain 1 armor and decrease a random status effect by 1
"CrimsonCloak" : {"TakeDamage", "Sanguine", "TakeDamageS", "Unique"}, #Restore 1 HP
#"DruidsCloak" : {"Unique", "HPLose", "CantHeal"}, #Whenever you lose hp, gain that much armor. Cannot restore hp
"ElderwoodNecklace" : {"Wood"}, #Base Stats
"EmeraldGemstone" : {"Unique", "Jewelry", "Emerald"}, #Battle Start: If Foe has more max hp than you, set your max hp to theirs.
"ExplosiveArrow" : {"TurnStart", "Bomb"}, #If foe doesnt have armor, deal 3 damage
"GrandTome" : {"Cooldown", "Unique"}, #CD 10: Retriggers all other tomes
"Honeycomb" : {"Unique", "Food"},
"IronTransfusion" : {"TurnStart"}, #Gain 2 armor lose 1 hp
"IronskinPotion" : {"BattleStart", "Potion", "Unique"}, #Gain armor = missing hp
"IronskinElixir" : {"BattleStart", "Potion", "Unique"}, #gain 20 max hp. Gain armor = missing hp
"IronstoneArmor" : {"Unique", "Stone", "PreFoeStrike"}, #Enemy strikes deal 2 less damage while you have armor
"LifeZap" : {"BattleStart", "Unique"}, #Lose all your hp except 1 and stun the foe for 2 turns
"LifebloodArmor" : {"BattleStart", "Sanguine"}, #Convert 50% of current hp rounded down to 2x armor
"LifebloodBurst" : {"Unique", "Sanguine", "Bomb", "HP3Restore"}, #Whenever you restore 3 or more hp, deal 3 damage
"LiferootBeast" : {"TurnStart", "Unique", "Wood"}, #If you have 0 regen, gain 3 regen
"LiferootLute" : {"Wounded", "Unique", "Instrument", "Wood"}, #Gain 3 regen
"LiferootLuteS" : {"Wounded", "Unique", "Instrument", "Wood"}, #Gain 3 regen
"MistArmor" : {"IgnoreSelfArmor"}, #Enemy strikes ignore armor
"MoonlightShield" : {"TurnStart"}, #If you are below 50% hp, gain 2 armor
"NoxiousGas" : {"TurnStart"}, #Both you and the foe get 1 poison
"OverchargedOrb" : {"Wounded", "Unique"}, #Stun the foe for 3 turns
"PetrifiedStatue" : {"BattleStart", "Unique", "Stone"}, #Give the foe 1 stun per stone equipped
"PlatedHelmet" : {"TurnStart"}, #If below 50% hp, gain 2 armor
"PurelakeChalice" : {"Water", "EveryOtherTurn"}, #Gain 1 purity eot
"RazorBreastplate" : {"Wounded"}, #Gain thorns = foe's attack
"RoyalShield" : {"TurnStart"}, #Convert 1 gold to 3 armor
"RubyGemstone" : {"OnHit", "Unique", "Jewelry", "Ruby"}, #If your attack if 1, deal 4 extra damage
"SanguineImp" : {"TurnStart", "Unique", "Sanguine"}, #Deal 1 damage and restore 1 hp
"SanguineMorphosis" : {"TurnStart", "Sanguine", "Unique"}, #Stun yourself and gain 3 regen
"SapphireGemstone" : {"ArmorLose", "Unique", "Jewelry", "Sapphire"}, #When ever you lose armor restore than much hp
"SerpentMask" : {"BattleStart"}, #Give the foe poison = to attack
"SheetMusic" : {"Cooldown", "Tome", "Unique"}, #CD 6: Trigger Symphony 3 times
"ShieldTalisman" : {"ArmorGain", "Unique"}, #Gain 1 more armor when gain armor
"SilverscaleGauntlet" : {"Unique", "EveryOtherTurn"}, #Give 1 riptide eot
"StonebornTurtle" : {"TurnStart", "Unique", "Stone"}, #Restore 1 hp, unless hp is full then gain 2 armor
"StormcloudDrum" : {"Wounded", "Unique", "Instrument"}, #Give the foe 1 stun
"StormcloudDrumS" : {"Wounded", "Unique", "Instrument"}, #Give the foe 1 stun
"StuddedGauntlet" : {"OnHit"}, #Deal 1 damage
"SwiftstrikeCloak" : {"BattleStart"}, #If you have more speed than foe, gain an additional strike
"SwiftstrikeGauntlet" : {"Wounded"}, #Gain 2 additional strikes next turn
"SwordTalisman" : {"Nonweapon", "Unique"}, #deal 1 more damage
"TimeBomb" : {"Exposed", "Bomb"}, #Exposed deal 1 damage. This item does 2 more damage for each start turn passed.
"TomeOfTheHero" : {"Cooldown", "Tome", "Unique"}, #CD 8: Gain 4 attack, 4 armor, and 4 speed
"WeaverArmor" : {"BattleStart", "Unique"}, #If you have 0 base armor, gain armor = current hp
#"ArcaneCloak" : {"Unique"}, #Reset Cooldowns after they trigger
"BloodmoonArmor" : {"SelfDamage", "Unique"}, #If youd take damage from your own items, deal it to the foes
"ChainlinkMedallion" : {"OnHitTrigger"}, #On Hit trigger twice
"ColdResistance" : {"Unique"}, #Freeze doubles your attack instead of halving
"GrandCrescendo" : {"Unique"}, #Symphony triggers all other instruments
"GraniteThorns" : {"Unique", "Stone", "BattleStart"}, #Needs a counter to not remove thorns
"PrimeForm" : {"Unique", "PreStrike"}, #Double attack while hp is full
"PrimordialSoup" : {"Unique"}, #Acid removes hp as well
"RazorScales" : {"ArmorLose", "Unique"}, #If you lose armor, deal damage = to lost armor
"SerpentScalemail" : {"Unique", "ArmorLose"}, #Give the foe 2 poison
"StormtideAnchor" : {"Unique", "RiptideDamage"}, #Stun foe 1 whenever riptide triggers
"TwinfuseKnot" : {"BombTrigger", "Unique"}, #Bomb items trigger twice
"BitterMelon" : {"TurnStart", "Food"}, #Convert 1 stack of another status effect to 1 poison
"BloodOrange" : {"BattleStart", "Wounded", "Food", "Sanguine"}, #Gain 3 acid
"BloodSausage" : {"Wounded", "Food", "Sanguine"}, #Restore 1 hp 5 times
"BloodySteak" : {"Wounded", "Sanguine", "Food"}, #Restore 10 hp and 5 armor
"BoiledHam" : {"BattleStart", "Exposed", "Wounded", "Food", "Water"}, #Decrease all status effects by 1
"CandiedNuts" : {"BattleStart", "Food", "ThornMult"}, #Gain 3 thorns, thorns do 2x
"CherryCocktail" : {"BattleStart", "Wounded", "Sanguine", "Bomb", "Food"}, #Deal 3 damage and restore 3 hp
"CombustibleLemon" : {"TurnStart", "Bomb", "Food"}, #Spend 1 speed to deal 2 bomb damage
"DeepseaWine" : {"Wounded", "Food", "RiptideDamage"}, #Give foe 1 riptide. Whenever a riptide triggers restore 3 hp
"ExplosiveFish" : {"BattleStart", "Food", "Bomb"}, #Give foe 1 riptide and deal 2xfoe.riptide bombdamage
"ExplosiveRoast" : {"BattleStart", "Bomb", "Food"}, #Deal 1 damage 4 times
"GraniteCherry" : {"BattleStart", "Stone", "Bomb", "Food"}, #If your hp is full, gain 2 armor and deal 2 damage 3 times
"HoneyCaviar" : {"Exposed", "Food"}, #Give foe 10 riptide
"HoneyHam" : {"Food"}, #Doubles max hp Idk if its just base max hp
"HoneydewMelon" : {"BattleStart", "Food"}, #Give all your status effects to the foe
"HoneyglazedShroom" : {"TurnStart", "Food", "Unique"}, #Give the foe 2 poison
"HornedMelon" : {"BattleStart", "Exposed", "Wounded", "Food"}, #Decrease 2 random status effects by 1 and gain that many thorns
"LemonRoast" : {"BattleStart", "Food"}, #Gain 2 acid
"LemonShark" : {"BattleStart", "Exposed", "Food"}, #Gain 1 acid
"LemonSyrup" : {"BattleStart", "Food"}, #Double your speed
"LimestoneFruit" : {"BattleStart", "Stone", "Food"}, #Gain 8 armor, if hp isnt full gain 2 acid
"MarbleMushroom" : {"BattleStart", "Stone", "Food"}, #Gain 3 poison
"MarbledStonefish" : {"BattleStart", "Exposed", "Stone", "Food"}, #If you hp is full, gain 5 armor and give foe 1 riptide
"MelonBomb" : {"BattleStart", "Exposed", "Wounded", "LoseStatus", "Food", "Bomb", "Water"}, #Decrease a random status effect by 1
"MelonLemonade" : {"BattleStart", "Exposed", "Wounded", "Food"}, #Remove all your acid
"MelonWine" : {"BattleStart", "Exposed", "Wounded", "Food", "Water"}, #Decrease a random status by 1 and restore 3 hp
"MineralWater" : {"BattleStart", "Exposed", "Food", "Water"}, #If HP is full, decrease a random status by 2 and gain 5 armor
"MoldyMeat" : {"Food"}, #Just Stats
"MushroomSoup" : {"TurnStart", "Food", "Wood"}, #Gain 1 poison and 1 regen
"PetrifiedChestnut" : {"BattleStart", "Food", "Stone"}, #If hp is full, gain 6 thorns and 6 armor
"PoisonousDurian" : {"TurnStart", "Food"}, #Gain 1 poison and 1 thorns
"PoisonousLemon" : {"BattleStart", "Food"}, #Gain 1 acid and 5 poison
"PoisonousPufferfish" : {"BattleStart", "Food"}, #Gain 3 poison and give foe 2 riptide
"PowderCookie" : {"BattleStart", "Food"}, #Gain 3 thorns and give foe 3 powder
"RoastedChestnut" : {"BattleStart", "Food"}, #Gain 4 thorns
"RockCandy" : {"BattleStart", "Stone", "Food"}, #Gain 15 armor, if hp is full gain 15 more. I think its individual
"RockRoast" : {"Stone", "Food"}, #Just stats
"SharkRoast" : {"Exposed", "Food"}, #Give foe 2 riptide
"SpikedWine" : {"Wounded", "Food"}, #Gain 5 thorns and restore 5 hp
"SpinyKiwifruit" : {"BattleStart", "Food"}, #Gain 3 acid and gain thorns = acid
"SpinySnapper" : {"BattleStart", "RiptideDamage", "Food"}, #Give foe 1 riptide. Whenever riptide triggers, gain 3 thorns
"SugarBomb" : {"TurnStart", "Bomb", "Food"}, #Deal 1 damage 3 times
'SweetWine' : {"Wounded", "Food"}, #Wounded restore 30 hp
"ToxicCherry" : {"TurnStart", "Food"}, #Gain 1 poison and deal 1 damage to foe
"TrailMix" : {"BattleStart", "Food", "Bomb"}, #Deal 1 bomb damage and gain 1 thorn 3 times
"UnderwaterWatermelon" : {"BattleStart", "Exposed", "Wounded", "Food"}, #Decrease 1 random status effect and give foe 1 riptide
"BloodRune" : {"Wounded", "Unique"}, #Wounded: Retriggers the last triggered wounded item.
"EchoRune" : {"Wounded", "Unique"}, #Wounded: Retrigger a random batstart item
"IronRune" : {"Unique"}, #If you have 1 exposed item, it triggers thrice
"BeltOfGluttony" : {"Unique"}, #Just Stats*
"BootsOfSloth" : {"Unique"}, #Just Stats*
"ChestOfLust" : {"Unique"}, #Just Stats*
"HelmetOfEnvy" : {"BattleStart", "Unique"}, #Double foe's Attack
#Need to write an effects thing for every weapon even if its just stats because that is when the strike calc should happen in the weapon effects
#Pretty sure the bomb weapons strikes dont activate powder only the extra effects do
# Might need some Weapons to check which tag is being searched
"BattleAxe" : {"Weapon", "PreStrike"}, #Deal 2x if foe is armored. Maybe add "Strike" tag
"BoomStick" : {"Weapon", "OnHit", "Bomb"}, # On hit deal one damage
"BrittlebarkBow" : {"Weapon", "TurnStart", "Wood"}, # After 3 strikes: lose 2 attack p sure triggers once
"ChampionsBlade" : {"Weapon"}, #Just Base Stats
"ElderwoodStaff" : {"Weapon", "Wood"}, #Its just stats
"FeatherweightBlade" : {"Weapon"}, #Its just stats
"ForgeHammer" : {"Weapon", "OnHit"}, #Give the enemy 2 armor
"FungalRapier" : {"Weapon", "BattleStart"}, #Gain 1 Poison
"GaleStaff" : {"Weapon", "OnHit"}, #Lose 1 Speed
"GrillingSkewer" : {"Weapon", "BattleStart", "Food"}, #Gain 1 additional strike(temp)
"Haymaker" : {"Weapon", "TurnStart"}, # Every 3 strikes gain another one
"HeartDrinker" : {"Weapon", "OnHit", "Sanguine"}, #On Hit: Restore 1 hp
"HiddenDagger" : {"Weapon"}, #It gives more attack the more HD you have, aka just stats
"IronstoneGreatsword" : {"Weapon", "Stone"}, #Just stats
"IronstoneSpear" : {"Weapon", "PreStrike", "Stone"}, #While you have armor, temp gain 2 attack
"KnightsBlade" : {"Weapon"}, #Just Base Stats
"LiferootStaff" : {"Weapon", "Wounded", "Wood"}, #Gain 3 regen when wounded
"MarbleSword" : {"Weapon", "Exposed", "Stone"}, #Exposed: Gain 3 attack
"PacifistStaff" : {"Weapon", "Wood", "OnHit"}, #Gain 1 armor and restore 1 hp
"RazorthornSpear" : {"Weapon", "OnHit"}, #Gain 2 thorns on hit
"RedwoodRod" : {"Weapon", "Wood"}, #Stats
"SilverscaleDagger" : {"Weapon", "BattleStart"}, #Give 1 Riptide
"SlimeSword" : {"Weapon", "BattleStart"}, #Give yourself and the foe 3 acid
"SpearshieldLance" : {"Weapon"}, #Stats
"SquiresBlade" : {"Weapon"}, #Stats
"StormcloudSpear" : {"Weapon", "OnHit"}, #Every 5 Strikes, stun the enemy for 2 turns. when its divisible by 5.
"SwordOfTheHero" : {"Weapon"}, #Stats
"WoodcuttersAxe" : {"Weapon", "Wood"}, #Basically just stats like HD
"WoodenStick" : {"Weapon", "Wood"}, #Default weapon
"ArcaneWand" : {"Weapon", "CantAttack", "TurnStart", "Wood"}, #Cant Attack. TS: Deal 2 + Count(Tome) damage
"BasiliskFang" : {"Weapon", "OnHit"}, #Decrease self poison by 2 and give it to foe.
"BejeweledBlade" : {"Weapon", "Jewelry", "BattleStart"}, # Gains 2 attack per jewelry item in inv Currently not a base stats thing
#Maybe 0 out the new temp attack for weapons right before checking if weapons have a temp increase
"BlackbriarBlade" : {"Weapon"}, #Gain 1 attack instead of thorns
"BloodmoonDagger" : {"Weapon", "Wounded", "Sanguine"}, # Gain 5 attack and take 2 self damage
"BloodmoonSickle" : {"Weapon", "OnHit", "Sanguine"}, # 1 Self damage
"BubblegloopStaff" : {"Weapon", "CantAttack", "TurnStart"}, #Spend 1 speed to give the foe 1 acid and 2 poison
"ExplosiveSword" : {"Weapon", "BombDamage5"}, #Whenever a bomb does 5 or more explosive damage, gain 1 additional strike
"FrostbiteDagger" : {"Weapon", "FirstTurnOnHit"}, #Give the foe freeze = your attack on hit
"GraniteAxe" : {"Weapon", "Unique", "Stone", "OnHit"}, #Lose 3 hp and gain 3 armor
"IcicleSpear" : {"Weapon", "Water", "Exposed"}, #Give the enemy 1 freeze for each equipped water item
"IronstoneBow" : {"Weapon", "OnHit", "Stone"}, #On hit lose 1 speed. If Speed is 0 or less only attack every other turn (Idk if it attacks everytime the first turn you are at 0 or less speed)
"LifebloodSpear" : {"Weapon", "HP3Restore"}, #Whenever you heal for 3 or more, gain 1 attack
"LiferootHammer" : {"Weapon", "Wood", "OnHit"}, #Regen that triggers overheal increases max hp. I assume this is before the Overheal gem
"LightningRod" : {"Weapon", "Unique", "TurnStart"}, #If stunned, gain 3 attack
"LightningWhip" : {"Weapon", "Unique", "TurnStart"}, #If foe is stunned, gain 1 strike
"RingBlades" : {"Weapon", "BattleStart"}, #Steal 1 attack from foe
"RustySword" : {"Weapon", "FirstTurnOnHit"}, #First Turn, On Hit Give the foe acid = your attack
"SanguineScepter" : {"Weapon", "Sanguine"}, #Healing doubled
"SwiftstrikeBow" : {"Weapon"}, #Maybe add "StrikeGain" whenever you gain a strike, gain another one
"SwiftstrikeRapier" : {"Weapon", "BattleStart"}, #If you have more speed than foe, gain 3 strikes
"WaveBreaker" : {"Weapon", "CantAttack", "BattleStart"}, #Give the foe 2*(negative base attack) riptide
"BloodlordsAxe" : {"Weapon", "BattleStart", "Sanguine"}, #Foe loses 5 hp, you restore 5 hp
"BrittlebarkClub" : {"Weapon", "Wood", "Exposed", "Wounded"}, #Exp or Wound lose 2 attack
"ChainmailSword" : {"Weapon", "Exposed"}, #Gain armor equal to base armor
"FrozenIceblade" : {"Weapon", "BattleStart", "Water"}, #Gain 3 freeze
"GemstoneScepter" : {"Weapon", "Jewelry", "OnHit"}, #Gain an on hit effect if you have emerald(+1HP), ruby(+1damage), sapphire(+1Armor), or citrine(+1spd) items
"GraniteHammer" : {"Weapon", "Stone", "OnHit"}, #Convert 1 armor to 2 attack p sure this the right order to gain the attack
"GraniteLance" : {"Weapon", "Stone"}, #Stat effect 2x base armor
"GrindstoneClub" : {"Weapon", "Stone"}, #Effect +2 attack to next weapon equipped (Makes figuring out weapon base stats more annoying)
"KingsBlade" : {"BattleStart"}, #Wounded and Exposed trigger at battle start
"LeatherWhip" : {"BattleStart"}, #Gain 5 max hp
"LifestealScythe" : {"Weapon", "OnHit", "Sanguine"}, #Restore HP = Damage done to HP
"MeltingIceblade" : {"OnHit", "Water"}, #Lose 1 attack
"MoonlightCleaver" : {"PreventStatusGain"}, #If below 50% hp cannot gain status
"PurelakeStaff" : {"BattleStart", "OnHit", "Water"}, #BS: Gain 2 purity. OH: Lose 1 purity
"QuickgrowthSpear" : {"Weapon", "EveryOtherTurn", "Wood"}, #Gain 1 attack and restore 1 HP
"RiverflowRapier" : {"Water", "FirstGainStatus"}, #First time you gain a new status effect, gain 1 strike
"RoyalCrownblade" : {"Weapon", "OnHit"}, #Gain 1 Gold
"RoyalScepter" : {"Weapon", "PreStrikeL", "Jewelry"}, #Set temp attack equal to gold. Cannot have more than 10 gold
"SerpentDagger" : {"Weapon", "OnHit"}, #Every 3 strikes give the foe 4 poison
"SilverscaleTrident" : {"Weapon", "OnHit"}, #Give 1 riptide
"StoneslabSword" : {"Weapon", "OnHit", "Stone"}, #Gain 2 armor
"ThunderboundSabre" : {"Weapon", "BattleStart"}, #Stun yourself for 2 turns
"TwinBlade" : {"Weapon", "BattleStart"}, #Base strikes count = 2 #Might want to make a PreBattle Tag??
"AncientWarhammer" : {"Weapon", "OnHit"}, #OH: Remove all of the foe's armor
"BearclawBlade" : {"Weapon", "PreStrikeL"}, #Attack = Missing HP
"DashmastersDagger" : {"Weapon", "BattleStart"}, #Gain additional strikes equal to speed
"LakebedSword" : {"Weapon", "Water"}, #Doubles the effects from Purity
"MountainCleaver" : {"Weapon", "BattleStart", "Stone"}, #Attack = Base Armor
"SpikyClub" : {"Weapon"}, #Maybe GainThorns tag? or add it to everything that adds thorns. GainThorns becomes GainAttack
"TempestBlade" : {"Weapon", "PreStrikeL"}, #Attack = Speed
"CleaverOfWrath" : {"Weapon"}, #Your max hp is always 1 (Disables all max hp changes)
"ScepterOfGreed" : {"Weapon"}, #Cant gain gold. (Disables all gold gain)
"SwordOfPride" : {"Weapon", "BattleStart"}, #If the foe has more attack, armor, or speed, take 3 damage
"BeeStinger" : {"Weapon", "FirstTurnStrike", "Food"}, #Give the foe 4 poison, 3 acid, and 2 stun on hit
"BlackbriarBow" : {"Weapon", "CantAttack", "TurnStart"}, #Turn Start gain thorns = to your attack
"BrokenWineglass" : {"Weapon", "Wounded"}, #When wounded, on your next turn keep striking until the foe is wounded
"CherryBlade" : {"Weapon", "BattleStart", "Exposed", "Food", "Bomb"}, #Deal 4 damage on batstart and exposed
"DeathcapBow" : {"Weapon", "BattleStart", "TurnStart"}, #BS: Gain 3 Poison. TS: Gain 1 additional strike, if you are poisoned
"HamBat" : {"Weapon", "BattleStart", "Food", "Wood"}, #Gain 2 additional strikes
"LemontreeBranch" : {"Weapon", "OnHit", "Food", "Wood"}, #Spend 2 speed to gain an additional strike
"MelonvineWhip" : {"Weapon", "OnHit", "Food", "Water"}, #On hit remove 1 stack of a random status effect on self
"RocksaltSword" : {"Weapon", "TurnStart"}, #if your hp is full, gain 1 additional strike
"SilverscaleSwordfish" : {"Weapon", "BattleStart", "FirstTurn", "Food"}, #Gain 1 extra strike on battle start, #First Turn on hit give the foe 1 riptide
#Blade Edges (Blacksmith)
"AgileEdge" : {"Edge", "FirstTurn"}, #Gain 1 additional strike on first turn
"BleedingEdge" : {"Edge", "OnHit"}, #Restore 1 HP
"BluntEdge" : {"Edge", "OnHit"}, #Gain 1 armor
"CleansingEdge" : {"Edge", "PreventStatusGain"}, #Ignore the first Status effect you are afflicted with
"CuttingEdge" : {"Edge", "OnHit"}, #Deal 1 Damage
"FeatherweightEdge" : {"Edge", "OnHit"}, #Convert 1 Speed to 1 Attack
"FreezingEdge" : {"Edge", "BattleStart"}, #Give foe 3 freeze
"GildedEdge" : {"Edge", "OnHit"}, #If Gold < 10, Gain 1 gold
"JaggedEdge" : {"Edge", "OnHit"}, #Gain 2 thorns and take 1 self damage
"OakenEdge" : {"Edge", "BattleStart"}, #Gain 3 regen
"OozingEdge" : {"Edge", "OnHit"}, #If foe poison = 0, give 2 poison
"PetrifiedEdge" : {"Edge", "OnHit"}, #Double your attack, OH: gain 1 stun
"PlatedEdge" : {"Edge", "OnHit"}, #Convert 1 speed to 3 armor
"RazorEdge" : {"Edge", "BattleStart"}, #Gain 1 attack
"SmokingEdge" : {"Edge", "OnHit"}, #Give 1 powder to foe
"StormcloudEdge" : {"Edge", "BattleStart"}, #Stun foe for 1 turn
"WhirlpoolEdge" : {"Edge", "OnHit"}, #Every 3 strikes, give 1 riptide
#Item Sets
"BloodmoonStrike" : {"Set", "Wounded"}, #On your next turn restore hp = to damage done by strikes
"BriarGreaves" : {"Set", "TakeDamage", "TakeDamageS"}, #On take damage, gain 1 thorn
"BrittlebarkBlessing" : {"Set"}, #Makes it so brittlebark stuff doesnt have a downside
"ElderwoodMask" : {"Set", "BattleStart"}, #Double all base attack, armor, speed
"HerosReturn" : {"Set"}, #Base Stats
"Highborn" : {"Set"}, #Retrigger all rings
"IronbarkShield" : {"Set"}, #If Hp is full, gain 1 armor at turn start
"IronbarkShieldTS": {"Set"}, #1 Armor Gain at turn start
"LifebloodTransfusion" : {"Set", "BattleEnd"}, #Restore 10 HP after battle. Kinda just not useful to include?
"RawHide" : {"Set", "EveryOtherTurn"}, #Gain 1 attack
"RedwoodCrown" : {"Set", "Wounded"}, #Restore HP to Full
"SaffronTalon" :{"Set", "OnHit"}, #Gain 1 speed on hit
"SteelplatedThorns" : {"Set", "ThornsLose"}, #Whenever you lose thorns gain that much armor
"BasilisksGaze" : {"Set", "BattleStart"}, #Your foe is stunned for 2 turns
"ChampionsGreaves" : {"Set"}, #Just Stats
"CrystalMirror": {"Set", "StatusGain"}, #Whenever you gain a status effect, give it to the foe too
"DeadlyToxin" : {"Set", "GainPoison"}, #First time foe gains poison, give 2 acid
"GraniteQuill" : {"Set"}, #Makes Regen give armor instead of hp
"HerosGlasses" : {"Set", "OnHit"}, #On Hit: Reduce countdowns by 1, Hero Tome and Hero's Crossguard
"HolyCrucifix" : {"Set"}, #Just changes base stats
"IronstoneCrest" : {"Set", "TurnStart"}, #Steal 2 armor from foe
"IronstoneFang" : {"Set", "FirstTurnOnHit"}, #Gain 3 armor on hit
"LiquidMetal" : {"Set", "BattleStart"}, #Give the foe 20 armor, Rusted Sword and Rusted Armor
"MarbleAnvil" : {"Set", "BattleStart"}, #
"MarshlightAria" : {"Set", "Exposed"}, #When exposed: Trigger symphony 3 times
"SeafoodHotpot" : {"Set", "BattleStart"}, #Gain 2 armor per speed
#Gotta redo the vamp cloak to check for stun at turn start *maybe*
"VampireCloak" : {"Set"}, #TS: If you are stunned, double all healing this turn
"WeaverMedallion" : {"Set", "TurnStart"}, #Spend 1 armor to gain 1 attack
"IronChain": {"Set", "BattleStart"}, #Gain 5 armor at battle start
"IronstoneArrowhead" : {"Set", "OnHit"}, #Gain 1 armor on hit
"IronstoneOre" : {"Set", "BattleStart"}, #Gain armor = negative speed
"SanguineGemstone" : {"Set", "OnHit"}, #If your attack == 1, restore 1 hp on hit? Idk if its sanguine
#Blessings might have in battle effects? Idk yet
#Enemies
"Bat" : {"OddEveryOtherTurn"},#Heal 1+Lvl HP OnHit every other strike not on the first strike
"Bear" : {"PreStrike"},#Gains 3+Lvl attack if foe has armor
"Beaver" : {"BattleStart"}, #Gains 3+Lvl regen?
"CrazedHoneybear" : {"PreStrike"},#Gains 3+Lvl attack if foe has armor
"Dragonfly" : {"BattleStart"}, #Gain attack = Speed - player speed >= 0
"Frog" : {"Exposed"}, #Gain 1 +Lvl armor on exposed?
"Hedgehog" : {"BattleStart"},#Gains 3+Lvl thorns on BattleStart
"HoneyBee" : {"FirstTurnStrike"}, #Give the foe 3+Lvl poison, 2+Lvl acid, and 1+Lvl stun on hit?
#"Raccoon" : {"SuperBattleStart"}, #Steals 1 + lvl items at random
"Raven" : {"OnHit"}, # OnHit steals 1+Lvl gold
"Slime" : {"BattleStart"}, # Battle Start: Give the player 4/6/8 acid
"Snake" : {"FirstTurnStrike"}, #Gives 2 + Lvl poison on first turn hit
"Spider" : {"BattleStart"}, #If Spider is faster, then it deals 3+Lvl damage BattleStart
"Turtle": {"TakeDamage", "TakeDamageS"}, #lose all armor
"Wolf" : {"PreStrike"}, #If Foe.CurrentHP <=5 temp attack is set to +2+Lvl
#Week 1 Bosses
"BlackKnight" : {"BattleStart"}, # Gain attack = Foe.Attack + 2 Might be prebattle but p sure its a battlestart speed, might be slower tho
"BloodmoonWerewolf" : {"PreStrike"}, #When player is below 50% HP, gains 5 attack
"BrittlebarkBeast" : {"TakeDamage"}, #Whenever it takes damage take 3 more
"IronstoneGolem" : {"Exposed"}, #When exposed lose 3 attack
"RazorclawGrizzly" : {"IgnoreFoeArmor"}, #Attacks ignore armor
"RazortuskHog" : {"FirstTurnStrike"},#If Razortusk Hog has more speed, first strike does 10 extra damage
#Swamp Week 1
"CarnivorousSlime" : {"BattleStart"}, #Gives 3 acid and converts all player's hp except 1 into armor
"FungalGiant" : {"BattleStart"}, #Gains 1 poison for each status effect the player has
"IronshellSnail" : {"BattleStart"}, #Gains 5 acid
"StormcloudDruid" : {"OnHit"}, #Stun the player for 1 turn every other strike
"SwampsongSiren" : {"BattleStart"}, #Gives the Player -2 attack
"ToxicMiretoad" : {"BattleStart"}, #Steals all the player's armor and gives 3 poison
#Week 2 Bosses
"BlackbriarKing" : {"TurnStart"}, #CANNOT ATTACK, instead gains 2 thorns every turn. 4 if wounded(Below 50% hp)
"FrostbiteDruid" : {"OnHit"}, #Gives the player 1 freeze
"GoldwingMonarch" : {"Wounded"}, #Steals all the players gold and heals for 2*Gold
"MountainTroll" : {""}, #Only strikes every other turn
"RedwoodTreant" : {"PreStrike"}, #Temp gains 3 attack if player has no armor
"SwiftstrikeStag" : {"BattleStart"}, #Strikes 3 times
#Swamp Week 2
"ClearspringSpirit" : {"BattleStart", "OnHit"}, #Gains 10 Purity. On Hit randomly decrease a self or player status
"GraniteGriffin" : {"Wounded"}, #Gains 40 armor and 4 stun
"LiferootExperiment" : {"BattleStart"}, #Gains 10 regen
"RockshellTortoise" : {"PreFoeStrike"}, #Whenever it is struck, gains 4 armor
"SilverscaleShark" : {"TurnStart"}, #Gives the player 2 riptide. Gains 1 temp attack per player riptide
"StonescaleBasilisk" : {"OnHit"}, #Gives 2 poison on hit
#Week 3 boss
"Leshen" : {}, #Currently does nothing
"WoodlandAbomination" : {"TurnStart"}, #Gain an attack
#Swamp Week 3
"AcidHead" : {"OnHit"}, #On Hit: Give 1 acid
"RiptideHead" : {"OnHit"}, #On Hit: Give 1 riptide
"PoisonHead" : {"OnHit"}, #On Hit: Give 2 poison
"StunHead" : {"TurnStartFoe", "TurnEnd"}, #Battle Start: Give 3 stun (The battle start is tech mid battle)
#MiniBosses
"IronshellBeetle" : {"OnHit"}, #Lose 1 attack on hit (Up to 0)
"LifebloodCount" : {"OnHit"}, #Restores 3 hp
"SilkweaverQueen" : {"TurnStart"}, #Turn Start steals 1 speed. If the foe has 0 or less speed, deal 3 damage instead
#Swamp MiniBosses
"CovenPlaguemother" : {"OnHit"}, #Gives the player 2 stacks of a random status they dont have
"MurkwaterGator" : {"BattleStart"}, #Gives the player riptide = to player's attack
"PalaceSentinel" : {"TurnStart"}, #If it is slower, self stun and gain 2 speed
}
# ["CurrentHP", "MaxHP", "Attack", "Armor", "Speed", "SpecialEffect", "Level", "Gold"] Special effect can just be an item
#100% Missing a lot of stats
def Enemies(Name, Level):
#Assuming level = 0 on Week 1
Lvl = Level - 1
if Name == "Bat":
#Correct
Stats = [4+2*Lvl, 4+2*Lvl, 1+Lvl, 0, 2+Lvl, ["Bat"], Level, 0, [0]] #Heal 1+Lvl HP OnHit every other strike
if Name == "Bear":
#Correct
Stats = [3+2*Lvl, 3+2*Lvl, 1+Lvl, 2+Lvl, 0+Lvl, ["Bear"], Level, 0, [0]] #Gains 3+Lvl attack if foe has armor
if Name == "Beaver":
Stats = [4+2*Lvl, 4+2*Lvl, 1+Lvl, 0, 1+Lvl, ["Beaver"], Level, 0, [0]] #Gains 3+Lvl regen on BS
if Name == "CrazedHoneybear":
#14, 6, 8, 4 LVL 3 +5 damage to armored foes
Stats = [6+4*Lvl, 6+4*Lvl, 2+2*Lvl, 4+2*Lvl, 2*Lvl, ["CrazedHoneybear"], Level, 0, [0]] #10, 4, 6, 2 LVL 2 +4 damage to armored foes
if Name == "Dragonfly": #Gain attack = Speed - player speed >= 0
Stats = [2+Lvl, 2+Lvl, 0, 0, 3+2*Lvl, ["Dragonfly"], Level, 0, [0]]
if Name == "Frog":
Stats = [2, 2, 1+Lvl, 2+Lvl, -max(Lvl - 1, 0)*(Lvl - 3)*2 + max(Lvl - 1, 0)*(Lvl - 2)*1.5, ["Frog"], Level, 0, [0]] #Gain 1 +Lvl armor on exposed?
if Name == "Hedgehog":
#Armor is 1 to 2 to 4?
Stats = [1+Lvl, 1+Lvl, 1, max(1, 2*Lvl), 0, ["Hedgehog"], Level, 0, [0]] #Gains 3+Lvl thorns on BattleStart
if Name == "HoneyBee": #Give the foe 3+Lvl poison, 2+Lvl acid, and 1+Lvl stun on hit
Stats = [6+4*Lvl, 6+4*Lvl, 2, 15, 2+2*Lvl, ["HoneyBee"], Level, 0, [0]]
if Name == "Raven": #Might be able to make it be one check enemy and then the level scales the stats?
#Correct
Stats = [3+2*Lvl, 3+2*Lvl, 0, 0, 2+Lvl, ["Raven"], Level, 0, [0]] #OnHit steals 1+Lvl gold
if Name == "Slime": # Battle Start: Give the player 4/6/8 acid
Stats = [2, 2, 2, 2+2*Lvl, 0, ["Slime"], Level, 0, [0]]
if Name == "Snake": #Gives 2 + Lvl poison on first turn hit
Stats = [2+Lvl, 2+Lvl, 1, 0, 2+Lvl, ["Snake"], Level, 0, [0]]
if Name == "Spider": #Might be able to make it be one check enemy and then the level scales the stats?
#Correct
Stats = [2+Lvl, 2+Lvl, 1, 0, 2+Lvl, ["Spider"], Level, 0, [0]] #If Spider is faster, then it deals 3+Lvl damage BattleStart
if Name == "Turtle": #Lose all armor
Stats = [1, 1, 3 + 3*Lvl, 15, 0, ["Turtle"], Level, 0, [0]]
if Name == "Wolf": #Might be able to make it be one check wolf and then the level scales the stats?
#Attack maxes to 2 at lvl 3
Stats = [3+3*Lvl, 3+3*Lvl, 1+min(1, Lvl), 0, 1+Lvl, ["Wolf"], Level, 0, [0]] #If Foe.CurrentHP <=5 temp attack is set to +2+Lvl
#Bosses-Week 1
if Name == "BlackKnight":
Stats = [10, 10, 0, 5, 0, ["BlackKnight"], Level, 0, [0]] #Gain attack = Foe.Attack + 2
if Name == "BloodmoonWerewolf":
Stats = [15, 15, 3, 0, 1, ["BloodmoonWerewolf"], Level, 0, [0]] #When player is below 50% HP, gains 5 attack
if Name == "BrittlebarkBeast":
Stats = [40, 40, 3, 0, 2, ["BrittlebarkBeast"], Level, 0, [0]] #Whenever you take damage take 3 more
if Name == "IronstoneGolem":
Stats = [5, 5, 4, 15, 1, ["IronstoneGolem"], Level, 0, [0]] #When exposed lose 3 attack
if Name == "RazorclawGrizzly":
Stats = [10, 10, 3, 5, 2, ["RazorclawGrizzly"], Level, 0, [0]] #Attacks ignore armor
if Name == "RazortuskHog":
Stats = [5, 5, 4, 0, 4, ["RazortuskHog"], Level, 0, [0]] #If Razortusk Hog has more speed, first strike does 10 extra damage
#Swamp Week 1
if Name == "CarnivorousSlime":
Stats = [20, 20, 1, 5, 5, ["CarnivorousSlime"], Level, 0, [0]] #Gives 3 acid and converts all player's hp except 1 into armor
if Name == "FungalGiant":
Stats = [30, 30, 3, 0, 0, ["FungalGiant"], Level, 0, [0]] #Gains 1 poison for each status effect the player has
if Name == "IronshellSnail":
Stats = [5, 5, 3, 50, -1, ["IronshellSnail"], Level, 0, [0]] #Gains 5 acid
if Name == "StormcloudDruid":
Stats = [20, 20, 2, 0, 2, ["StormcloudDruid"], Level, 0, [0]] #Stun the player for 1 turn every other strike
if Name == "SwampsongSiren":
Stats = [15, 15, 3, 0, 2, ["SwampsongSiren"], Level, 0, [0]] #Gives the Player -2 attack
if Name == "ToxicMiretoad":
Stats = [20, 20, 2, 0, 3, ["ToxicMiretoad"], Level, 0, [0]] #Steals all the player's armor and gives 3 poison
#Bosses-Week 2
if Name == "BlackbriarKing":
Stats = [50, 50, 0, 0, 0, ["BlackbriarKing"], Level, 0, [0]] #CANNOT ATTACK, instead gains 2 thorns every turn. 4 if wounded(Below 50% hp)
if Name == "GoldwingMonarch":
Stats = [40, 40, 3, 0, 4, ["GoldwingMonarch"], Level, 0, [0]] #Steals all the players gold and heals for 2*Gold
if Name == "FrostbiteDruid": #Gives the player 1 freeze
Stats = [10, 10, 3, 20, 4, ["FrostbiteDruid"], Level, 0, [0]]
if Name == "MountainTroll": #Currently lazy coding only works if Troll stays 0 speed
Stats = [20, 20, 10, 10, 0, ["MountainTroll"], Level, 0, [0]] #Attack every other turn
if Name == "RedwoodTreant":
Stats = [25, 25, 3, 15, 0, ["RedwoodTreant"], Level, 0, [0]] #Temp gains 3 attack if player has no armor
if Name == "SwiftstrikeStag":
Stats = [10, 10, 3, 5, 5, ["SwiftstrikeStag"], Level, 0, [0]] #3 Strikes per turn
#Swamp Week 2
if Name == "ClearspringSpirit":
Stats = [30, 30, 3, 0, 2, ["ClearspringSpirit"], Level, 0, [0]] #BS: Gains 10 Purity. On Hit randomly decrease a self or player status
if Name == "GraniteGriffin":
Stats = [20, 20, 5, 10, 0, ["GraniteGriffin"], Level, 0, [0]] #Gains 40 armor and 4 stun
if Name == "LiferootExperiment":
Stats = [40, 40, 3, 0, 0, ["LiferootExperiment"], Level, 0, [0]] #Gains 10 regen
if Name == "RockshellTortoise":
Stats = [20, 20, 4, 10, 0, ["RockshellTortoise"], Level, 0, [0]] #Whenever it is struck, gains 4 armor
if Name == "SilverscaleShark":
Stats = [15, 15, 0, 10, 3, ["SilverscaleShark"], Level, 0, [0]] #TS: Gives the player 2 riptide. Gains 1 temp attack per player riptide
if Name == "StonescaleBasilisk": #Gives 2 poison on hit
Stats = [10, 10, 4, 20, 2, ["StonescaleBasilisk"], Level, 0, [0]]
#Bosses-Week 3
if Name == "Leshen":
Stats = [50, 50, 7, 0, 3, ["Leshen"], Level, 0, [0]] #Nothing?
if Name == "WoodlandAbomination": #Phase 2, but you heal to full hp sooooo, its just a new fight
Stats = [100, 100, 0, 0, 3, ["WoodlandAbomination"], Level, 0, [0]] #Gains an attack at start of turn
#Swamp-Week 3
if Name == "AcidHead":
Stats = [10, 10, 3, 30, 4, ["AcidHead"], Level, 0, [0]] #On Hit: Gives 1 acid
if Name == "RiptideHead":
Stats = [30, 30, 5, 0, -1, ["RiptideHead"], Level, 0, [0]] #On Hit: Gives 1 riptide
if Name == "PoisonHead":
Stats = [50, 50, 2, 0, 2, ["PoisonHead"], Level, 0, [0]] #On Hit: Gives 2 poison
if Name == "StunHead":
Stats = [20, 20, 5, 30, 5, ["StunHead"], Level, 0, [0]] #Battle Start: Gives 3 stun
if Name == "SwamplandHydraWOAcid": #Is a hecking mess, basically 4 different bosses as one enemy
Stats = [30, 30, 5, 0, -1, ["RiptideHead"], Level, 0, [0]] #On Hit: Gives 1 riptide
if Name == "SwamplandHydraWORiptide": #Is a hecking mess, basically 4 different bosses as one enemy
Stats = [10, 10, 3, 30, 4, ["AcidHead"], Level, 0, [1]] #On Hit: Gives 1 acid
if Name == "SwamplandHydraWOPoison": #Is a hecking mess, basically 4 different bosses as one enemy
Stats = [10, 10, 3, 30, 4, ["AcidHead"], Level, 0, [2]] #On Hit: Gives 1 acid
if Name == "SwamplandHydraWOStun": #Is a hecking mess, basically 4 different bosses as one enemy
Stats = [10, 10, 3, 30, 4, ["AcidHead"], Level, 0, [3]] #On Hit: Gives 1 acid
#Minibosses
if Name == "IronshellBeetle":
Stats = [10, 10, 7, 50, 0, ["IronshellBeetle"], Level, 0, [0]] #OnHit lose 1 attack
if Name == "LifebloodCount": #Lifeblood Count, Heals 3 on hit
Stats = [30, 30, 3, 0, 2, ["LifebloodCount"], Level, 0, [0]] #Heals 3 on hit
if Name == "SilkweaverQueen":
Stats = [20, 20, 3, 10, 4, ["SilkweaverQueen"], Level, 0, [0]] #Turn Start steals 1 speed. If the foe has 0 or less speed, deal 3 damage instead
if Name == "CovenPlaguemother": #Gives the player 2 stacks of a random status they dont have
Stats = [30, 30, 3, 10, 2, ["CovenPlaguemother"], Level, 0, [0]]
if Name == "MurkwaterGator": #BattleStart gives the player riptide = to player's attack
Stats = [20, 20, 4, 15, 3, ["MurkwaterGator"], Level, 0, [0]]
if Name == "PalaceSentinel": #Turn Start if it is slower, self stun and gain 2 speed
Stats = [20, 20, 7, 20, 0, ["PalaceSentinel"], Level, 0, [0]]
return Stats
def ItemSets(self):
if "BasiliskFang" in self.Items and "BasiliskScale" in self.Items:
self.Items.append("BasilisksGaze") #Your foe is stunned for 2 turns
self.Quality.append(0)
if "BloodmoonDagger" in self.Items and "SwiftstrikeGauntlet" in self.Items:
self.Items.append("BloodmoonStrike") #On your next turn restore hp = to damage done by strikes
self.Quality.append(0)
if "AssaultGreaves" in self.Items and "JaggedEdge" in self.Items:
self.Items.append("BriarGreaves") #On take damage, gain 1 thorn
self.Quality.append(0)
if "BrittlebarkBow" in self.Items and "BrittlebarkArmor" in self.Items and "BrittlebarkBuckler" in self.Items:
self.Items.append("BrittlebarkBlessing") #Brittlebark items do not have a downside
self.Quality.append(0)
if "ChampionsArmor" in self.Items and "ChampionsBlade" in self.Items:
self.Items.append("ChampionsGreaves") #Just Stats
self.Quality.append(0)
#if "MarbleMirror" in self.Items and "SinfulMirror" in self.Items:
#self.Items.append("CrystalMirror") #Whenever you gain a status effect, give it to the foe
#self.Quality.append(0)
if "NervePotion" in self.Items and "ViperExtract" in self.Items:
self.Items.append("DeadlyToxin") #The first time the foe gains poison, give 2 acid
self.Quality.append(0)
if "ElderwoodStaff" in self.Items and "ElderwoodNecklace" in self.Items:
self.Items.append("ElderwoodMask") #Double all base attack, armor, speed
self.Quality.append(0)
if "TomeOfTheHero" in self.Items and "HerosCrossguard" in self.Items:
self.Items.append("HerosGlasses") #Double all base attack, armor, speed
self.Quality.append(0)
if "SwordOfTheHero" in self.Items and "BootsOfTheHero" in self.Items and "ShieldOfTheHero" in self.Items:
self.Items.append("HerosReturn") #Base Stats
self.Quality.append(0)
if Count(self, "Ring") >= 3:
self.Items.append("Highborn") #Retrigger all rings
self.Quality.append(0)
if "HolyShield" in self.Items and "HolyTome" in self.Items:
self.Items.append("HolyCrucifix") #Just changes base stats
self.Quality.append(0)
if "PineconeBreastplate" in self.Items and "StoneSteak" in self.Items:
self.Items.append("IronbarkShield") #If Hp is full, gain 1 armor at turn start
self.Quality.append(0)
if "ChainmailSword" in self.Items and "ChainmailArmor" in self.Items:
self.Items.append("IronChain") #Gain 5 armor
self.Quality.append(0)
if "IronstoneSpear" in self.Items and "IronstoneSandals" in self.Items:
self.Items.append("IronstoneArrowhead") #Gain 1 armor on hit
self.Quality.append(0)
if "ForgeHammer" in self.Items and "ForgeGauntlet" in self.Items:
self.Items.append("IronstoneCrest") #TS: Steal 2 armor from foe
self.Quality.append(0)
if "IronstoneBracelet" in self.Items and "PetrifiedStatue" in self.Items:
self.Items.append("IronstoneOre") #Gain armor = negative speed
self.Quality.append(0)
if "IronTransfusion" in self.Items and "LifebloodArmor" in self.Items:
self.Items.append("LifebloodTransfusion") #Restore 10 HP after battle. Kinda just not useful to include?
self.Quality.append(0)
if "VenomousFang" in self.Items and "CrimsonFang" in self.Items:
self.Items.append("IronstoneFang") #Just changes base stats
self.Quality.append(0)
if "RustySword" in self.Items and "RustedPlate" in self.Items:
self.Items.append("LiquidMetal") #Give the foe 20 armor, Rusted Sword and Rusted Armor
self.Quality.append(0)
if "MarbleSword" in self.Items and "SerpentLyre" in self.Items:
self.Items.append("MarbleAnvil") #BS: Trigger exposed
self.Quality.append(0)
if "MarshlightLantern" in self.Items and "RiverflowViolin" in self.Items:
self.Items.append("MarshlightAria") #When exposed: Trigger symphony twice
self.Quality.append(0)
if "LeatherBoots" in self.Items and "LeatherGlove" in self.Items and "LeatherVest" in self.Items:
self.Items.append("RawHide") #Gain 1 attack every other turn
self.Quality.append(0)
if "RedwoodRod" in self.Items and "RedwoodCloak" in self.Items and "RedwoodHelmet" in self.Items:
self.Items.append("RedwoodCrown") #Restore HP to Full on Wounded
self.Quality.append(0)
if "FeatherweightBlade" in self.Items and "SaffronFeather" in self.Items:
self.Items.append("SaffronTalon") #Gain 1 speed on hit
self.Quality.append(0)
if "SanguineScepter" in self.Items and "RubyGemstone" in self.Items:
self.Items.append("SanguineGemstone") #If your attack == 1, restore 1 hp on hit
self.Quality.append(0)
if "ClearspringWatermelon" in self.Items and "SilverscaleFish" in self.Items and "SourLemon" in self.Items:
self.Items.append("SeafoodHotpot") #Gain 2 armor per speed
self.Quality.append(0)
if "SpearshieldLance" in self.Items and "BrambleBuckler" in self.Items:
self.Items.append("SteelplatedThorns") #Turn Start: If you have less than 10 thorns, double your thorns.
self.Quality.append(0)
if "MoonlightCrest" in self.Items and "SunlightCrest" in self.Items:
self.Items.append("TwilightCrest") #As long as you are below 50% hp, all healing is doubled
self.Quality.append(0)
if "SanguineMorphosis" in self.Items and "VampiricStasis" in self.Items:
self.Items.append("VampireCloak") #TS: If you are stunned, double all healing this turn
self.Quality.append(0)
if "WeaverArmor" in self.Items and "WeaverShield" in self.Items:
self.Items.append("WeaverMedallion") #5 base hp
self.Quality.append(0)
#need to add equipments (Including enemy and bosses effects as equipment) and blacksmith effects
class Player:
def __init__(self, Stats, Order): #self, CurrentHP, MaxHP, Attack, Armor, Speed, Items, Lvl, Gold, Quality, Order):
self.CurrentHP = Stats[0]
self.MaxHP = Stats[1]
self.Attack = Stats[2]
self.Armor = Stats[3]
self.Speed = Stats[4]
self.Items = Stats[5]
self.Level = Stats[6]
self.Gold = Stats[7]
self.Quality = Stats[8]
self.Order = Order
ItemSets(self)
self.WoundTriggers = 0
#Determines if you start above wounded threshhold
if self.CurrentHP/self.MaxHP > 0.5:
self.WoundTriggers = 1
self.ExposedTriggers = 1
if "BlacksmithBond" in self.Items:
self.ExposedTriggers = 2
self.ExposedMultiTrigger = 1
if "IronRune" in self.Items:
self.ExposedMultiTrigger = 3
self.GainedArmor = False
if self.Armor > 0:
self.GainedArmor = True
self.BaseArmor = np.copy(self.Armor)
self.DeltaSpeed = 0
self.Powder = 0
self.BombMult = 1
self.TempBombBonus = 0
self.BombBonus = 0
self.Thorns = 0
self.ThornsDecrease = 0
self.FirstThornLose = True
self.StrikesCount = 1 #Twin Blades should set this to 2 also Ig?
self.BaseStrikesCount = 1 #Twin Blades should set this to 2
self.FirstStrike = True
# self.ArmorShielding = 0
# if "IronstoneBracelet" in self.Items:
# self.ArmorShielding = 1
self.FirstFoeStrikeMult = 1
if "FrostbiteArmor" in self.Items:
self.FirstFoeStrikeMult = 2
self.DeltaArmor = 0 #Purely used for armor lose currently then run a check for armorlose items then reset deltaarmor to 0
self.FirstTurn = True
self.FirstTurnStrike = True
self.FirstTurnPostStrike = True
self.TempAttack = 0
self.StrikeReduction = 0
self.ThornsTriggers = 0
self.StrikeMult = 1
if "PetrifiedEdge" in self.Items:
self.StrikeMult = 2
self.OnHitTrigger = 1 + Count(self, "OnHitTrigger")
self.OnHitTriggerFT = Count(self, "OnHitTriggerFT")
self.StrikeCounter = 0 #Only Used for Weapons
self.TurnCounter = 0
self.Cooldown = 0 #need to increment every turn and from other items
self.CooldownReduction = 0 #Decreases max CD
self.CooldownMult = 1 #Multiplicative Reduction of CD
if "ArcaneGauntlet" in self.Items:
self.CooldownMult = 0.5
self.TomeTriggers = 1
if "ArcaneLens" in self.Items:
self.TomeTriggers = 3
self.GraniteTome = True
self.HolyTome = True
self.LiferootTome = True
self.SanguineTome = True
self.SilverscaleTome = True
self.StormcloudTome = True
self.CausticTome = True
self.GrandTome = True
self.SheetMusic = True
self.TomeOfTheHero = True
self.GrandTomeRetriggers = False
self.Odd = True #Used exclusively for IronstoneBow
self.DamageFromFoeStrike = 0
self.HPloseFromFoeStrike = 0
self.FirstHealToggle = True #Purely to count if you have healed once to fine the first heal amount for the one lifebloodspear
self.Freeze = 0
self.Poison = 0
self.Riptide = 0
self.FirstRiptide = True
self.Acid = 0
self.Stun = 0
self.Purity = 0
self.Regen = 0
self.SecondTakeDamage = True
self.SecondNonWeapon = 0
self.TakeDamageCount = 0 #Counts the number times you take damage in a turn
self.SanguineMult = 1
if "VampiresTooth" in self.Items:
self.SanguineMult = 2
self.SanguineScepterMult = 1
if "SanguineScepter" in self.Items:
self.SanguineScepterMult = 2
self.TwilightCrestMult = 1
if "TwilightCrest" in self.Items:
self.TwilightCrestMult = 2
self.VampireCloak = 1
if "VampireCloak" in self.Items:
self.VampireCloak = 2
self.BombTrigger = 1
if "TwinfuseKnot" in self.Items:
self.BombTrigger = 2
if "PowderKeg" in self.Items and Count(self, "Bomb") == 1:
self.BombTrigger = 3
self.RingTrigger = 1
if "Highborn" in self.Items: #Retrigger all rings
self.RingTrigger = 2
self.NoBBB = True
if "BrittlebarkBlessing" in self.Items:
self.NoBBB = False
self.HP1PotionTrigger = True
self.HP1ElixirTrigger = True
self.NervePot = True
self.NerveElixir = True
self.ViperPot = True
self.ViperElixir= True
self.DeadlyToxin = True
self.PlatedShield = False
if "PlatedShield" in self.Items:
self.PlatedShield = True
self.StatusesGained = []
self.PreventStatusGain = False
self.FirstStatus = True
self.FreezeMult = 1
self.BaseFreezeMult = 0.5
if "ColdResistance" in self.Items:
self.BaseFreezeMult = 2
self.HealingDisabled = False
if Count(self, "CantHeal") > 0:
self.HealingDisabled = True
self.BrokenWineglass = False
self.GoldGain = True
if "ScepterOfGreed" in self.Items:
self.GoldGain = False
self.Alive = True
#self.RHeal = 0 Prob not using
self.StunHead = True
#I need freezemult damage reduction to occur then the -tempattack from the ironstone armor/ironstone bracelet
#That is search weapons (Blacksmithing is added after the base effects) then items.
#Hit damage, on hit, blacksmith edge, foes reaction to being hit (thorns from foe, brittlebark armor etc.)
#Player.Items = ["Weapon", "Edge", "Inv"]
def Strike(self, Foe):
self.FreezeMult = 1
if self.Freeze > 0:
self.FreezeMult = self.BaseFreezeMult
SC = int(np.copy(self.StrikesCount))
# if Foe.Armor > 0:
# mult = 1
# elif Foe.Armor == 0:
# mult = -1
# else:
# print("Warning Armor somehow became negative")
#If you have Ironstone bow
if "IronstoneBow" in self.Items or "MountainTroll" in self.Items:
if self.Speed > 0 and ("IronstoneBow" in self.Items):
self.StrikeLoop(Foe, SC)
self.CheckThornsLose(Foe)
elif self.Speed <= 0 and self.Odd: #And speed <=0, attack every other turn, might not work right if you gain 2 speed everyother turn or smth
self.Odd = False
self.StrikeLoop(Foe, SC)
self.CheckThornsLose(Foe)
else:
self.Odd = True #When speed <= 0 and its not odd cannot attack
elif Count(self, "IgnoreFoeArmor") > 0 or Count(Foe, "IgnoreSelfArmor") > 0: #{"IgnoreArmor"}, #Attacks ignore armor"
for i in range(0, SC): #Check if death occurs before each strike/after?
self.TempAttack = 0
Foe.StrikeReduction = 0
if self.FirstTurnStrike == True:
self.Search("FirstTurnStrike", Foe)
self.StrikeCounter = self.StrikeCounter + 1
PreStrikeAttackBonus(self, Foe)
PreStrikeL(self, Foe) #Need to set self.TempAttack = 0 since these weapons set attack not gain?
self.StrikeCalcIgnoreArmor(Foe) #Might need to add multistrikes here
if np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult > 0: #Might need to go in the above for loop????
TakeDamage(Foe, self) #TakeDamage check for items
self.StrikeMult = 1
if self.FirstStrike:
Foe.Search("AfterFoeFirstStrike", self) #Unsure what Phase this is.
self.FirstStrike = False
self.ThornsDamage(Foe) #Adds thorns activation
self.AliveCheck(Foe)
Death(Foe)
HP1Check(Foe, self)
Foe.FirstFoeStrikeMult = 1
self.TempAttack = 0
Foe.StrikeReduction = 0
if self.BrokenWineglass == True:
SC = min(SC + 1, 25)
self.StrikesCount = self.BaseStrikesCount
self.CheckThornsLose(Foe)
else:
self.StrikeLoop(Foe, SC)
self.CheckThornsLose(Foe)
return Foe
def StrikeLoop(self, Foe, SC):
self.FreezeMult = 1
if self.Freeze > 0:
self.FreezeMult = self.BaseFreezeMult
for i in range(0, SC): #Check if death occurs before each strike/after?
self.TempAttack = 0
Foe.StrikeReduction = 0
if self.FirstTurnStrike == True:
self.Search("FirstTurnStrike", Foe)
self.StrikeCounter = self.StrikeCounter + 1
PreStrikeAttackBonus(self, Foe)
PreStrikeL(self, Foe) #Need to set self.TempAttack = 0 since these weapons set attack not gain?
self.StrikeCalc(Foe) #Might need to add multistrikes here
if np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult > 0: #Might need to go in the above for loop????
TakeDamage(Foe, self) #TakeDamage check for items
self.StrikeMult = 1
if self.FirstStrike:
Foe.Search("AfterFoeFirstStrike", self) #Unsure what Phase this is.
self.FirstStrike = False
self.ThornsDamage(Foe) #Adds thorns activation
self.AliveCheck(Foe)
Death(Foe)
HP1Check(Foe, self)
Foe.FirstFoeStrikeMult = 1
Foe.StrikeReduction = 0
self.TempAttack = 0
if self.BrokenWineglass == True:
SC = min(SC + 1, 25)
self.StrikesCount = self.BaseStrikesCount
def StrikeCalc(self, Foe):
if self.Alive and Foe.Alive: #Might be just Foe.Alive in game?
self.FreezeMult = 1
if self.Freeze > 0:
self.FreezeMult = self.BaseFreezeMult
StrikeMult(self, Foe)
if np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult > 0:
Foe.DamageFromFoeStrike = np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult
if self.FirstTurnPostStrike == True:
self.Search("FirstTurnPostStrike", Foe)
Foe.HPloseFromFoeStrike = max(0, np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult- Foe.Armor)
Foe.CurrentHP = min(Foe.CurrentHP, Foe.CurrentHP + Foe.Armor - np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult)
HP1Check(Foe, self)
Foe.DeltaArmor = min(Foe.Armor, np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult)
ArmorLose(Foe, self)
Foe.DeltaArmor = 0
Foe.Armor = max(0, Foe.Armor - np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult)
Foe.StrikeReduction = 0
#Might need to go into the strike function in its own seperate for loop??????????
OnHit(self, Foe) #Checks for On hit effects including weapons and blacksmithed and include dealdamage
def StrikeCalcIgnoreArmor(self, Foe):
if self.Alive and Foe.Alive:
self.FreezeMult = 1
if self.Freeze > 0:
self.FreezeMult = self.BaseFreezeMult
StrikeMult(self, Foe)
if np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult > 0:
Foe.DamageFromFoeStrike = np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult
if self.FirstTurnPostStrike == True:
self.Search("FirstTurnPostStrike", Foe)
Foe.HPloseFromFoeStrike = max(0, np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult) #Idk why its -Foe.Armor here?
Foe.CurrentHP = min(Foe.CurrentHP, Foe.CurrentHP - np.floor(((self.StrikeMult*(self.Attack + self.TempAttack))*self.FreezeMult) - Foe.StrikeReduction)*Foe.FirstFoeStrikeMult)
Foe.StrikeReduction = 0
HP1Check(Foe, self)
#Might need to go into the strike function in its own seperate for loop??????????
OnHit(self, Foe) #Checks for On hit effects including weapons and blacksmithed and include dealdamage
def ThornsDamage(self, Foe):
if Foe.Thorns > 0:
c = Foe.Count("ThornMult")
ThornsMult = 2**c
if self.Armor > 0:
c = Foe.Count("ThornMultArmor")
ThornsMult = ThornsMult * 2**c
elif self.Armor <= 0:
c = Foe.Count("ThornMultNoArmor")
ThornsMult = ThornsMult * 2**c
#basically this only checks for it once?
# if "CandiedNuts" in Foe.Items:
# ThornsMult = 2*ThornsMult
# elif "PiercingThorns" in Foe.Items:
# if self.Armor > 0:
# ThornsMult = 2*ThornsMult
DealDamage(ThornsMult*Foe.Thorns, Foe, self)
def CheckThornsLose(self, Foe):
if Foe.ThornsTriggers > 0:
Foe.ThornsTriggers = Foe.ThornsTriggers - 1
else:
StatusInterp("Thorns", Foe, self, -Foe.Thorns)
#ThornsLose(Foe, self, Foe.Thorns)
#Foe.Thorns = 0
def Wounded(self, Foe):
if self.CurrentHP/self.MaxHP <= 0.5 and self.CurrentHP>0 and self.WoundTriggers > 0 and self.Alive and Foe.Alive:
P = self
P.WoundTriggers = self.WoundTriggers - 1
#Check each players inv slot by slot for wounded in self and wounded in foe if foe has blood chain
if "BloodChain" in Foe.Items:
P.MultiSearch("Wounded", Foe, "Wounded") #It might activate all the faster persons items first instead of a slot by slot check
else:
P.Search("Wounded", Foe)
if Foe.BrokenWineglass == True:
Foe.BrokenWineglass = False
def Exposed(self, Foe):
P = self
if self.Armor == 0 and self.ExposedTriggers > 0 and self.GainedArmor == True and self.Alive and Foe.Alive:
P.ExposedTriggers = self.ExposedTriggers - 1
P.GainedArmor = False #Toggles checkGainedArmor
self.MultiSearch("Exposed", Foe, "FoeExposed")
# self.Search("Exposed", Foe) #Add all exposed triggers here
# Foe.Search("FoeExposed", self)
def Count(self, Tag):
P = self
x = 0
for slot in range(0, len(P.Items)):
if Tag in ItemTags[P.Items[slot]]:
x = x + 1
return x
def Search(self, Tag, Foe):
if self.Alive and Foe.Alive:
P = self
if isinstance(Tag, str):
Tag = [Tag]
for slot in range(0, len(P.Items)):
# Check if any tag in Tag is in the item's tags
if any(t in ItemTags[P.Items[slot]] for t in Tag):
[P, Foe] = ItemsEffect(Tag[0], self.Quality[slot], self.Items[slot], P, Foe) #Tag[0] is incorrect, trying t?
def RandomSearch(self, Tag, Foe):
if self.Alive and Foe.Alive:
P = self
List = []
if isinstance(Tag, str):
Tag = [Tag]
for slot in range(0, len(P.Items)):
# Check if any tag in Tag is in the item's tags
if any(t in ItemTags[P.Items[slot]] for t in Tag):
List.append(slot)
#This *probably* works Idk
if List != []:
RanNumber = random.randint(0, len(List) - 1)
slot = int(List[RanNumber])
[P, Foe] = ItemsEffect(Tag, self.Quality[slot], self.Items[slot], P, Foe)
def MultiSearch(self, TagP, Foe, TagF): #Seperate multisearch REQUIRES Speed order check (Outside when used)??
if self.Alive and Foe.Alive:
P = self
if isinstance(TagP, str):
TagP = [TagP]
if isinstance(TagF, str):
TagF = [TagF]
if self.Order == "First":
for slot in range(0, max(len(P.Items), len(Foe.Items))):
if slot < len(P.Items):
for t in TagP:
if t in ItemTags[P.Items[slot]]:
[P, Foe] = ItemsEffect([t], self.Quality[slot], self.Items[slot], P, Foe)
if slot < len(Foe.Items):
for t in TagF:
if t in ItemTags[Foe.Items[slot]]:
[Foe, P] = ItemsEffect([t], Foe.Quality[slot], Foe.Items[slot], Foe, P)
if self.Order == "Second":
for slot in range(0, max(len(P.Items), len(Foe.Items))):
if slot < len(Foe.Items):
for t in TagF:
if t in ItemTags[Foe.Items[slot]]:
[Foe, P] = ItemsEffect([t], Foe.Quality[slot], Foe.Items[slot], Foe, P)
if slot < len(P.Items):
for t in TagP:
if t in ItemTags[P.Items[slot]]:
[P, Foe] = ItemsEffect([t], self.Quality[slot], self.Items[slot], P, Foe)
def AliveCheck(self, Foe): #Checks which player, if any, died
#Check if you are the swampland hydra if you die change to the next hydra head instead of dying
HydraCheck(self)
HydraCheck(Foe)
if self.CurrentHP <= 0:
self.Alive = False
if Foe.CurrentHP <= 0:
Foe.Alive = False
def RandomStatus(self, Foe, Value, Has): #Look at Player/ Foe? / Both? (Might add more functionality) and selects a status effect they currently have.
Statuses = ["Thorns", "Freeze", "Regen", "Poison", "Stun", "Riptide", "Acid", "Purity"] #list(StatusFunctions.keys())
CurrentStatus = []
StatusStacks = 0
PickedStatus = "null"
#key: use getattr and setattr
if Has:
for ii in range(0, len(Statuses)):
if getattr(self, Statuses[ii]) > 0:
CurrentStatus.append(Statuses[ii])
else:
for ii in range(0, len(Statuses)):
if getattr(self, Statuses[ii]) <= 0:
CurrentStatus.append(Statuses[ii])
if CurrentStatus != []:
PickedStatus = random.choice(CurrentStatus)
if Value < 0:
StatusStacks = min(-Value, getattr(self, PickedStatus)) #Should be amount removed
StatusInterp(PickedStatus, self, Foe, -StatusStacks)
elif Value > 0:
StatusStacks = Value #getattr(self, PickedStatus)
StatusInterp(PickedStatus, self, Foe, Value)
#RanNumber = random.randint(0, len(CurrentStatus))
# if PickedStatus != "Stun" and PickedStatus != "Freeze":
# StatusFunctions[PickedStatus](self, Foe, Value)
# else:
# StatusFunctions[PickedStatus](Value, Foe, self)
return [PickedStatus, StatusStacks]
def StatusInterp(Status, Player, Foe, Value): #Ultimately this is where a super generalized any status gain/loss check should be able to go
StatusFunctions = {
"Thorns": GainThorns,
"Freeze": GainFreeze,
"Regen": GainRegen,
"Poison": GainPoison,
"Stun": GainStun,
"Riptide": GainRiptide,
"Acid": GainAcid,
"Purity": GainPurity,
}
# Player.StatusesGained = []
Player.PreventStatusGain = False
Player.Search("PreventStatusGain", Foe)
if Status != "null" and not Player.PreventStatusGain and Value > 0:
StatusFunctions[Status](Player, Foe, Value)
if "CrystalMirror" in Player.Items:
StatusFunctions[Status](Foe, Player, Value) #Gives the foe the status effect
if Status not in Player.StatusesGained:
Player.StatusesGained.append(Status)
Player.Search("FirstGainStatus", Foe)
if "RiverflowTalisman" in Player.Items:
StatusFunctions[Status](Player, Foe, 1)
elif Value < 0 and getattr(Player, Status) > 0:
StatusFunctions[Status](Player, Foe, max(Value, -getattr(Player, Status)))
Player.Search("LoseStatus", Foe)
def DealDamage(Damagevalue, Player, Foe):
if Damagevalue > 0 and Player.Alive and Foe.Alive:
Foe.CurrentHP = min(Foe.CurrentHP, Foe.CurrentHP + Foe.Armor - Damagevalue) #Updates hp of foe if foe's armor reached 0
Player.AliveCheck(Foe)
Death(Foe)
#Player.TempBombBonus = 0
Player.BombMult = 1
HP1Check(Foe, Player)
if Foe.Armor > 0:
Foe.DeltaArmor = max(min(Foe.Armor, Damagevalue), 0)
ArmorLose(Foe, Player)
Foe.DeltaArmor = 0
Foe.Armor = max(0, Foe.Armor - Damagevalue)
Nonweapon(Player, Foe)
TakeDamage(Foe, Player)
# if Foe.Armor - Damagevalue >= 0 and Foe.Armor != 0:
# Foe.Armor = Foe.Armor - Damagevalue #Updates foe's armor to be old armor - self attack
# TakeDamage(Foe, Player) #Add TakeDamage check
# #Foe.Exposed(Player)
# else:
# Foe.CurrentHP = Foe.CurrentHP + Foe.Armor - Damagevalue #Updates hp of foe if foe's armor reached 0
# Foe.Armor = 0
# TakeDamage(Foe, Player) #Add TakeDamage check
# #Foe.Wounded(Player) #have you wounded the foe?
# #Foe.Exposed(Player)
#Write ItemsEffect("VampiricWine") runs +4 to self hp
def ItemsEffect(Phase, Quality, Name, Player, Foe): #Quality is a number 0: Normal, 1: Gold, 2: Diamond, 2**Quality gives the multiplier
if Name == "ArcaneBell": #Decrease all cooldowns by 1.
Player.CooldownReduction = Player.CooldownReduction + 1
Symphony(Player, Foe, "ArcaneBell")
if Name == "ArcaneBellS": #Decrease all cooldowns by 1.
Player.CooldownReduction = Player.CooldownReduction + 1
if Name == "CherryBomb": #Deals 1 damage 2 times
BombDamage(1*(2**Quality), Player, Foe)
BombDamage(1*(2**Quality), Player, Foe)
if Name == "CitrineEarring": #Gain 1 Speed every other turn
#Player.Speed = Player.Speed + 1
Player.DeltaSpeed = 1*(2**Quality)
GainSpeed(Player, Foe, 1*(2**Quality))
if Name == "CitrineRing":
for nn in range(0, Player.RingTrigger):
if Player.Speed > 4:
GainStrikes(Player, Foe, 1)
if Name == "ClearspringFeather": #Decrease a random status effect by 1 and give it to the foe......
[Status, Stacks] = Player.RandomStatus(Foe, -1*(2**Quality), True) #This automagically changes a random self status effect
if Stacks > 0:
StatusInterp(Status, Foe, Player, Stacks)
if Name == "ClearspringWatermelon": #Decrease a random status effect by 1
if any(p in ("BattleStart", "Wounded") for p in Phase):
[Status, Stacks] = Player.RandomStatus(Foe, -1*(2**Quality), True) #This automagically changes a random self status effect
if any(p in ("Exposed") for p in Phase):
for nn in range(0, Player.ExposedMultiTrigger):
[Status, Stacks] = Player.RandomStatus(Foe, -1*(2**Quality), True)
if Name == "CrackedWhetstone": #Gain 2 attack for the first turn only
Player.TempAttack = Player.TempAttack + 2*(2**Quality)
# if Player.FirstTurn:
# Player.Attack = Player.Attack + 2
# else:
# Player.Attack = Player.Attack - 2
if Name == "DeviledEgg": #Does Nothing
Player.Armor = Player.Armor
if Name == "DoubleplatedArmor":
#Player.Armor = Player.Armor + 3
#Player.GainedArmor = True
#Runs check for gained armor items
for nn in range(0, Player.ExposedMultiTrigger):
ArmorGain(Player, Foe, 3*(2**Quality))
if Name == "EmeraldEarring": #Restore 1 hp
HealingCalc(Player, Foe, 1*(2**Quality))
if Name == "EmeraldRing":
for nn in range(0, Player.RingTrigger):
HealingCalc(Player, Foe, 3*(2**Quality))
if Name == "EmergencyShield": #Less speed than enemy, give 5 armor
if Player.Speed < Foe.Speed:
#Player.Armor = Player.Armor + 5
ArmorGain(Player, Foe, 5*(2**Quality))
if Name == "FrostbiteGauntlet": #Give the enemy 1 Freeze
StatusInterp("Freeze", Foe, Player, 1*(2**Quality))
#Freeze(1, Player, Foe)
if Name == "FrostbiteTrap": #Give the enemy 3 freeze
StatusInterp("Freeze", Foe, Player, 3*(2**Quality))
#Freeze(3, Player, Foe)
if Name == "GraniteEgg": #Does Nothing
Player.Armor = Player.Armor
if Name == "GraniteTome": #CD 4: Gain 6 armor
if (Player.Cooldown + Player.CooldownReduction > np.ceil(4*Player.CooldownMult) and Player.GraniteTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
ArmorGain(Player, Foe, 6*(2**Quality))
Cooldowned(Player, Foe)
Player.GraniteTome = False
if Name == "HolyTome": #CD 6: Gain 3 attack
if (Player.Cooldown + Player.CooldownReduction > np.ceil(6*Player.CooldownMult) and Player.HolyTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
Player.Attack = Player.Attack + 3*(2**Quality)
Cooldowned(Player, Foe)
Player.HolyTome = False
if Name == "HornedHelmet": #Gain 1 thorn
StatusInterp("Thorns", Player, Foe, 1*(2**Quality))
#GainThorns(Player, Foe, 1)
if Name == "IceblockShield": #Self freeze 2
StatusInterp("Freeze", Player, Foe, 2)
#Freeze(2, Foe, Player)
if Name == "IronstoneBracelet": #Foe strikes deal 1 less damage if you have armor, else +1
if Player.Armor > 0:
Player.StrikeReduction = Player.StrikeReduction + 1
else:
Player.StrikeReduction = Player.StrikeReduction - 1
if Name == "LifebloodHelmet": #On First turn restore hp = damage from strikes
HealingCalc(Player, Foe, Foe.DamageFromFoeStrike)
if Name == "LiferootGauntlet": #Gain 1 Regen
StatusInterp("Regen", Player, Foe, 1)
#GainRegen(Player, Foe, 1)
if Name == "LiferootTome": #CD 4: Gain 3 regen
if (Player.Cooldown + Player.CooldownReduction > np.ceil(4*Player.CooldownMult) and Player.LiferootTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
StatusInterp("Regen", Player, Foe, 3*(2**Quality))
#GainRegen(Player, Foe, 3)
Cooldowned(Player, Foe)
Player.LiferootTome = False
if Name == "LightspeedPotion": #BatStart Restore HP = Speed
if Player.Speed > 0:
HealingCalc(Player, Foe, Player.Speed)
if Name == "LightspeedElixir": #BatStart gain max hp and Restore HP = Speed
if Player.Speed > 0:
Player.MaxHP = Player.MaxHP + Player.Speed
#Player.Wounded(Foe) #Idk if can cause wounded
HealingCalc(Player, Foe, Player.Speed)
if Name == "MusclePotion": #Every 3 strikes gain 1 attack
if Player.StrikeCounter%3 == 0:
Player.Attack = Player.Attack + 1*(2**Quality)
if Name == "MuscleElixir": #Every 3 strikes gain 1 attack, 1 armor, and 1 speed
if Player.StrikeCounter%3 == 0:
Player.Attack = Player.Attack + 1*(2**Quality)
ArmorGain(Player, Foe, 1*(2**Quality))
GainSpeed(Player, Foe, 1*(2**Quality))
if Name == "PetrifyingFlask": #Wounded: Gain 10 armor and 2 stun
ArmorGain(Player, Foe, 10*(2**Quality))
StatusInterp("Stun", Player, Foe, 2*(2**Quality))
#Stun(2, Foe, Player)
if Name == "PetrifyingElixir": #Wounded: Gain 10 armor and stun everyone for 2 turns
ArmorGain(Player, Foe, 10*(2**Quality))
StatusInterp("Stun", Player, Foe, 2*(2**Quality))
StatusInterp("Stun", Foe, Player, 2*(2**Quality))
#Stun(2, Foe, Player)
#Stun(2, Player, Foe)
if Name == "PowderPlate": #Give Foe 2 powder
Foe.Powder = Foe.Powder + 2
if Name == "PurelakeHelmet": #BatStart: Gain 1 Purity
StatusInterp("Purity", Player, Foe, 1*(2**Quality))
#GainPurity(Player, Foe, 1)
if Name == "RedwoodCloak": #If on BatStart hp not full, restore 2
if Healable(Player):
HealingCalc(Player, Foe, 2*(2**Quality))
# x = Player.CurrentHP - Player.MaxHP + 2
# Player.CurrentHP = min(Player.MaxHP, Player.CurrentHP + 2)
# HPRestored(Player, Foe) #Adds check if have an item with effect from hp healing
# if "HPOverHeal" in Player.Items and x > 0:
# DealDamage(x, Player, Foe)
if Name == "RedwoodHelmet": #Restore 3 hp on exposed
for nn in range(0, Player.ExposedMultiTrigger):
HealingCalc(Player, Foe, 3*(2**Quality))
if Name == "RoyalHorn": #Wounded: Gain 2 gold symphony
if Player.GoldGain:
Player.Gold = Player.Gold + 2
Symphony(Player, Foe, "RoyalHorn")
if Name == "RoyalHornS": #Wounded: Gain 2 gold symphony
if Player.GoldGain:
Player.Gold = Player.Gold + 2
if Name == "RubyEarring": #Deal 1 damage eot
DealDamage(1*(2**Quality), Player, Foe)
if Name == "RubyRing": #Gain 2 attack and take 3 damage
for nn in range(0, Player.RingTrigger):
Player.Attack = Player.Attack + 2*(2**Quality)
SelfArmorLose(Player, Foe, 3*(2**Quality))
# if SelfArmorLose(Player):
# Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 3) #Updates hp of foe if foe's armor reached 0
# if Player.Armor > 0:
# ArmorGain(Player, Foe)
# TakeDamage(Player, Foe)
# else:
# DealDamage(3, Foe, Player)
if Name == "RustyRing": #Give the foe 1 acid
for nn in range(0, Player.RingTrigger):
StatusInterp("Acid", Foe, Player, 1*(2**Quality))
#GainAcid(Foe, Player, 1)
if Name == "SaffronFeather": #Convert 1 speed to 2 hp even if cannot heal?
if Player.Speed > 0:
Amount = min(1*(2**Quality), Player.Speed)
Player.Speed = Player.Speed - Amount
HealingCalc(Player, Foe, 2*Amount)
if Name == "SanguineTome": #CD 6: Full heal
if (Player.Cooldown + Player.CooldownReduction > np.ceil(6*Player.CooldownMult) and Player.SanguineTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
Sanguine(Player, Foe, Player.MaxHP - Player.CurrentHP)
Cooldowned(Player, Foe)
Player.SanguineTome = False
if Name == "SapphireEarring": #Gain 1 armor eot
#Player.Armor = Player.Armor + 1
ArmorGain(Player, Foe, 1*(2**Quality))
if Name == "SapphireRing": #Steal 2 armor from foe (if possible)
for nn in range(0, Player.RingTrigger):
if Foe.Armor > 0: #and no towershield triggers?
Amount = min(Foe.Armor, 2*(2**Quality))
Foe.Armor = Foe.Armor - Amount
Foe.DeltaArmor = Amount
ArmorLose(Foe, Player) #Armor loss for foe
Foe.DeltaArmor = 0
#Player.Armor = Player.Armor + min(Foe.Armor, 2)
ArmorGain(Player, Foe, Amount)
if Name == "SerpentLyre": #Give the foe 3 poison
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Poison", Foe, Player, 3)
#GainPoison(Foe, Player, 3)
Symphony(Player, Foe, "SerpentLyre")
if Name == "SerpentLyreS": #Give the foe 3 poison
StatusInterp("Poison", Foe, Player, 3)
#GainPoison(Foe, Player, 3)
if Name == "SilverscaleFish": #Give the foe 1 riptide
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Riptide", Foe, Player, 1*(2**Quality))
#GainRiptide(Foe, Player, 1)
if Name == "SilverscaleTome": #CD 3: Give the foe 2 riptide
if (Player.Cooldown + Player.CooldownReduction > np.ceil(3*Player.CooldownMult) and Player.SilverscaleTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
StatusInterp("Riptide", Foe, Player, 2*(2**Quality))
#GainRiptide(Player, Foe, 2)
Cooldowned(Player, Foe)
Player.SilverscaleTome = False
if Name == "SlimeArmor": #Gain 1 acid
StatusInterp("Acid", Player, Foe, 1*(2**Quality))
#GainAcid(Player, Foe, 1)
if Name == "SoapStone": #Spend 2 speed to gain 4 temp attack
if Player.Speed > 0:
Player.DeltaSpeed = -min(2, Player.Speed)
Player.TempAttack = Player.TempAttack + 2*min(2, Player.Speed)
GainSpeed(Player, Foe, -min(2, Player.Speed))
if Name == "SourLemon": #Gain 1 acid
StatusInterp("Acid", Player, Foe, 1*(2**Quality))
#GainAcid(Player, Foe, 1)
if Name == "SpinyChestnut": #Gain 3 thorns
StatusInterp("Thorns", Player, Foe, 3*(2**Quality))
#GainThorns(Player, Foe, 3)
if Name == "StormcloudTome": #CD 4: Stun foe 1 turn
if (Player.Cooldown + Player.CooldownReduction > np.ceil(4*Player.CooldownMult) and Player.StormcloudTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
StatusInterp("Stun", Foe, Player, 1*(2**Quality))
#Stun(1, Player, Foe)
Cooldowned(Player, Foe)
Player.StormcloudTome = False
if Name == "SwiftstrikeBelt": #Take 3 damage gain 1 strike on next turn
GainStrikes(Player, Foe, 1*(2**Quality))
SelfArmorLose(Player, Foe, 3*(2**Quality))
# if SelfArmorLose(Player):
# Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 3)
# if Player.Armor > 0:
# ArmorGain(Player, Foe)
# TakeDamage(Player, Foe)
# else:
# DealDamage(3, Foe, Player)
if Name == "TreebarkEgg": #Does Nothing
Player.Armor = Player.Armor
if Name == "VampiricWine":
Sanguine(Player, Foe, 4*(2**Quality))
if Name == "VenomousFang": #First Turn: Give foe 2 poison OH
StatusInterp("Poison", Foe, Player, 2*(2**Quality))
#GainPoison(Foe, Player, 2)
if Name == "WeaverShield": #If you have 0 base armor, gain 4 armor
if Player.BaseArmor == 0:
ArmorGain(Player, Foe, 4*(2**Quality))
if Name == "WetEgg": #Does Nothing
Player.Armor = Player.Armor
if Name == "ArcaneShield": #When a countdown effect triggers, gain 3 armor
ArmorGain(Player, Foe, 3)
if Name == "BasiliskScale": #BatStart: Gain 5 armor and 5 poison
ArmorGain(Player, Foe, 5)
StatusInterp("Poison", Player, Foe, 5)
#GainPoison(Player, Foe, 5)
if Name == "BigBoom": #If Foe is at or below 50%, deal 20 damage
if Foe.CurrentHP/Foe.MaxHP <= 0.5:
BombDamage(20, Player, Foe)
if Name == "BlackbriarGauntlet": #Gain 2 thorns per armor lost from foe's first strike
if Foe.FirstStrike:
StatusInterp("Thorns", Player, Foe, 2*Player.DeltaArmor)
#GainThorns(Player, Foe, 2*Player.DeltaArmor)
if Name == "BlackbriarRose": #Whenever you restore hp gain 2 thorns
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
if Name == "BlastcapArmor": #Take 5 Damage
for nn in range(0, Player.ExposedMultiTrigger):
SelfBombDamage(5, Player, Foe)
if Name == "BombBag": #Spend 3 speed to retrigger a random bomb
if any(p in ("BattleStart", "Wounded") for p in Phase): #if Phase in ("BattleStart", "Wounded"):
if Player.Speed > 2:
#Idk if it takes speed if you have no bombs
#Player.Speed = Player.Speed - 3
GainSpeed(Player, Foe, -3)
Player.RandomSearch("Bomb", Foe)
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Speed > 2:
#Idk if it takes speed if you have no bombs
#Player.Speed = Player.Speed - 3
GainSpeed(Player, Foe, -3)
Player.RandomSearch("Bomb", Foe)
if Name == "BrambleBelt": #Gain 2 thorns and give the foe 1 more strike
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
GainStrikes(Foe, Player, 1)
if Name == "BrambleBuckler": #Convert 1 armor to 2 thorns
if Player.Armor >= 1:
SelfArmorLose(Player, Foe, 1) #Trigger SelfArmorLose
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
if Name == "BrambleTalisman": #Whenever you gain thorns, gain 1 armor
ArmorGain(Player, Foe, 1)
if Name == "BrambleVest": #The first time you lose thorns, restore hp = to lost thorns
if Player.Thorns > 0 and Player.FirstThornLose:
HealingCalc(Player, Foe, Player.ThornsDecrease)
if Name == "RazorvineTalisman": #When gain thorns, gain another one
Player.Thorns = Player.Thorns + 1
#Might need to add thorn gain check in Future
if Name == "BrittlebarkBuckler": #After Foe's First Strike take damage then lose all armor Probably can just put it as a check directly in the strike calc
if Player.NoBBB:
if Player.Armor > 0:
SelfArmorLose(Player, Foe, Player.Armor)
if Name == "CausticTome": #CD 3: Give the foe 3 acid, unless they have no armor, then give 3 poison
if (Player.Cooldown + Player.CooldownReduction > np.ceil(3*Player.CooldownMult) and Player.CausticTome) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
if Foe.Armor > 0:
StatusInterp("Acid", Foe, Player, 3)
elif Foe.Armor == 0:
StatusInterp("Poison", Foe, Player, 5)
Cooldowned(Player, Foe)
Player.CausticTome = False
if Name == "ChainmailCloak": #If you have armor restore 2 hp
if Player.Armor > 0:
HealingCalc(Player, Foe, 2)
if Name == "ClearspringCloak": #Remove all status effects and gain 1 armor per stack removed
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Thorns > 0:
x = Player.Thorns
StatusInterp("Thorns", Player, Foe, -Player.Thorns)
ArmorGain(Player, Foe, x)
if Player.Freeze > 0:
x = Player.Freeze
StatusInterp("Freeze", Player, Foe, -Player.Freeze)
ArmorGain(Player, Foe, x)
if Player.Regen > 0:
x = Player.Regen
StatusInterp("Regen", Player, Foe, -Player.Regen)
ArmorGain(Player, Foe, x)
if Player.Poison > 0:
x = Player.Poison
StatusInterp("Poison", Player, Foe, -Player.Poison)
ArmorGain(Player, Foe, x)
if Player.Stun > 0:
x = Player.Stun
StatusInterp("Stun", Player, Foe, -Player.Stun)
ArmorGain(Player, Foe, x)
if Player.Riptide > 0:
x = Player.Riptide
StatusInterp("Riptide", Player, Foe, -Player.Riptide)
ArmorGain(Player, Foe, x)
if Player.Acid > 0:
x = Player.Acid
StatusInterp("Acid", Player, Foe, -Player.Acid)
ArmorGain(Player, Foe, x)
if Player.Purity > 0:
x = Player.Purity
StatusInterp("Purity", Player, Foe, -Player.Purity)
ArmorGain(Player, Foe, x)
#GainPurity(Player, Foe, -Player.Purity)
if Name == "ClearspringOpal": #TS: Spend 1 speed to decrease a random status effect by 1
if Player.Speed > 0:
GainSpeed(Player, Foe, -1)
[Status, Stacks] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if Name == "ClearspringRose": #Whenever you restore hp, decrease a random status effect by 1.
[Status, Stacks] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if Name == "CorrodedBone": #Convert 50% of Enemies hp into Armor. Rounded down?
#Might not count as damage?
if np.floor(Foe.CurrentHP/2) > 0:
ArmorGain(Foe, Player, np.floor(Foe.CurrentHP/2))
Foe.CurrentHP = np.ceil(Foe.CurrentHP/2)
TakeDamage(Foe, Player) #Might be missing smth
if Name == "CrackedBouldershield": #Gain 7 armor
for nn in range(0, Player.ExposedMultiTrigger):
#Player.Armor = Player.Armor + 7
ArmorGain(Player, Foe, 7)
if Name == "CrimsonFang": #If your hp is full, lose 5 hp and gain 2 strikes
if Player.MaxHP == Player.CurrentHP:
Player.CurrentHP = Player.CurrentHP - 5
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
GainStrikes(Player, Foe, 2)
TakeDamage(Player, Foe)
if Name == "DoubleExplosion": #The 2nd time you deal nonweapon damage a turn, deal 3 damage.
if Player.SecondNonWeapon == 2:
DealDamage(3, Player, Foe)
if Name == "DoubleplatedVest": #Every 3rd time you take damage, gain 2 armor.
ArmorGain(Player, Foe, 2)
if Name == "EnergyDrain": #steal 5 of foe's speed
if Foe.Speed > 0: #Player.Speed == 0 and
#Player.Speed = np.copy(Foe.Speed)
Player.DeltaSpeed = np.copy(min(Foe.Speed, 5))
GainSpeed(Player, Foe, min(Foe.Speed, 5))
Foe.Speed = Foe.Speed - min(Foe.Speed, 5)
if Name == "ExplosivePowder": #All bomb items deal 1 more damage
Player.BombBonus = Player.BombBonus + 1
if Name == "ExplosiveSurprise": #Deal 6 damage
for nn in range(1, Player.BombTrigger):
BombDamage(6, Player, Foe)
# DealDamage(6 + Foe.Powder, Player, Foe)
# Foe.Powder = max(0, Foe.Powder - 1)
if Name == "FeatherweightArmor": #Gain 2 armor for every gained speed
#Player.Armor = Player.Armor + 2*Player.DeltaSpeed
ArmorGain(Player, Foe, Player.DeltaSpeed)
if Name == "FeatherweightGauntlet": #Spend 2 speed to gain 4 attack temp
GainSpeed(Player, Foe, -2)
Player.TempAttack = Player.TempAttack + 4
if Name == "FeatherweightGreaves": #If you have 0 speed, gain 1 speed
if Player.Speed <= 0:
Player.DeltaSpeed = 1
GainSpeed(Player, Foe, 1)
if Name == "FeatherweightHelmet": #Spend 2 armor and gain 3 speed and 1 attack
if Player.Armor >= 2:
#Player.Armor = Player.Armor - 2
SelfArmorLose(Player, Foe, 2) #Trigger SelfArmorLosecheck and then damage
#Player.Speed = Player.Speed + 3
Player.DeltaSpeed = 3
GainSpeed(Player, Foe, 3)
Player.Attack = Player.Attack + 1
if Name == "FeatherweightWings": #If you have less speed than the foe, gain attack = speed
if Player.Speed < Foe.Speed:
Player.Attack = Player.Attack + Player.Speed
if Name == "FirecrackerBelt": #Deal 1 damage 4 times
Bonus = np.copy(Player.TempBombBonus)
Player.TempBombBonus = 0
for nn in range(0, Player.ExposedMultiTrigger):
for i in range(0, 4):
BombDamage(1 + Bonus, Player, Foe)
# DealDamage(1 + Foe.Powder, Player, Foe)
# Foe.Powder = max(0, Foe.Powder - 1)
if Name == "FlameburstTome": #CD 4: Deal 4 and reset cooldown
if (Player.Cooldown%(np.ceil(4*Player.CooldownMult) - Player.CooldownReduction) == 0) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
DealDamage(4, Player, Foe)
Cooldowned(Player, Foe)
if Name == "ForgeGauntlet": #Give the foe 5 armor
ArmorGain(Foe, Player, 5)
if Name == "FortifiedGauntlet":#If you have armor, gain an armor
if Player.Armor > 0:
#Player.Armor = Player.Armor + 1
ArmorGain(Player, Foe, 1)
if Name == "FriendshipBracelet" : #Battle Start: The enemy loses 1 attack
Foe.Attack = Foe.Attack - 1
if Name == "FrostbiteArmor": #Enemy's first strike does 2x, then give them 4 freeze
StatusInterp("Freeze", Foe, Player, 4)
#Freeze(4, Foe, Player)
if Name == "FrostbiteCurse": #Give yourself and foe 5 freeze each
StatusInterp("Freeze", Player, Foe, 5)
StatusInterp("Freeze", Foe, Player, 5)
#Freeze(5, Player, Foe)
#Freeze(5, Foe, Player)
if Name == "FrostbiteGreaves": #Whenever you lose speed, give the foe 1 freeze
StatusInterp("Freeze", Foe, Player, 1)
if Name == "GoldRing": #Gain 1 gold RING
if Player.GoldGain:
for nn in range(0, Player.RingTrigger):
Player.Gold = Player.Gold + 1
if Name == "GraniteCrown": #Gain max HP = to Base armor
Player.MaxHP = Player.MaxHP + Player.BaseArmor
#MaxHPGain? It can cause wounded to trigger
Player.Wounded(Foe)
if Name == "GraniteFungi": #Gain 2 armor to you and foe
ArmorGain(Player, Foe, 2)
ArmorGain(Foe, Player, 2)
if Name == "HeartshapedAcorn": #If you have 0 base armor set HP to MaxHP
if Player.BaseArmor == 0 and Player.MaxHP > Player.CurrentHP:
#Could need smth for twilightcrest Idk
Player.CurrentHP = Player.MaxHP
HPRestored(Player, Foe)
if Name == "HeartshapedPotion": #When reaching exactly 1 hp first time restore HP to MaxHP (Need to add every that loses hp)
if Player.HP1PotionTrigger:
if Player.MaxHP > 1:
Player.HP1PotionTrigger = False
Sanguine(Player, Foe, Player.MaxHP - 1)
if Name == "HeartshapedElixir": #When reaching below 5 hp first time restore HP to MaxHP (Need to add every that loses hp)
if Player.HP1ElixirTrigger:
if Player.MaxHP > 1:
Player.HP1ElixirTrigger = False
Sanguine(Player, Foe, Player.MaxHP - Player.CurrentHP)
if Name == "IceSpikes": #If you have freeze, gain 5 thorns
if Player.Freeze > 0:
StatusInterp("Thorns", Player, Foe, 5)
#GainThorns(Player, Foe, 5)
if Name == "IceTomb": #If you have armor, gain 3 armor and 1 freeze.
if Player.Armor > 0:
ArmorGain(Player, Foe, 3)
StatusInterp("Freeze", Player, Foe, 1)
#Freeze(1, Foe, Player)
if Name == "ImpressivePhysique": #Exposed: Stun the foe for 1 turn
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Stun", Foe, Player, 1)
#Stun(1, Player, Foe)
if Name == "IronRose":
#Player.Armor = Player.Armor + 1
ArmorGain(Player, Foe, 1) #Runs check for gained armor items
if Name == "IronShrapnel": #Deal 3 damage to foe if has armor. else deal 2x
#for nn in range(1, Player.Bombtrigger):
if Foe.Armor > 0:
BombDamage(3, Player, Foe)
# DealDamage(3 + Foe.Powder, Player, Foe)
# Foe.Powder = max(0, Foe.Powder - 1)
elif Foe.Armor == 0:
Player.BombMult = 2*Player.BombMult
BombDamage(3, Player, Foe)
if Name == "IronstoneSandals": #Gain 2 attack when have armor
if Player.Armor > 0:
Player.TempAttack = Player.TempAttack + 2
if Name == "KindlingBomb": #Deal 1 damage, then give the next bomb a temp damage increase.
BombDamage(1, Player, Foe)
Player.TempBombBonus = Player.TempBombBonus + 3
if Name == "LeatherBoots":#More speed than foe, gain 2 attack
if Foe.Speed < Player.Speed:
Player.Attack = Player.Attack + 2
if Name == "LeatherWaterskin": #Gain 2 purity, repeat for each equipped water item
for nn in range(0, Player.ExposedMultiTrigger):
c = Count(Player, "Water")
#for nn in range(0, c + 1):
StatusInterp("Purity", Player, Foe, 2*(c+1))
#GainPurity(Player, Foe, 2)
if Name == "LightningBottle": #Stun yourself for 1 turn
StatusInterp("Stun", Player, Foe, 1)
#Stun(1, Foe, Player)
if Name == "LightningElixir": #Stun yourself for 2 turns
StatusInterp("Stun", Player, Foe, 2)
#Stun(2, Foe, Player)
if Name == "MarbleMirror": #Gain armor = foes current armor
ArmorGain(Player, Foe, Foe.Armor)
if Name == "MarshlightLantern": #Lose 3 hp and gain 8 armor
for nn in range(0, Player.ExposedMultiTrigger):
Player.CurrentHP = Player.CurrentHP - 3
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
ArmorGain(Player, Foe, 8)
TakeDamage(Player, Foe)
if Name == "MoonlightCrest": #If you are below 50% hp, gain 1 regen
if Player.CurrentHP/Player.MaxHP < 0.5:
StatusInterp("Regen", Player, Foe, 1)
#GainRegen(Player, Foe, 1)
if Name == "MuscleGrowth": #While you have regen, temp gain 3 attack
if Player.Regen > 0:
Player.TempAttack = Player.TempAttack + 3
if Name == "MushroomBuckler": #If you have poison, foe strikes do 1 less damage
if Player.Poison > 0:
Foe.TempAttack = Foe.TempAttack - 1
if Name == "NervePoison": #The first time the foe gains poison, give them 1 stun
if Player.NervePot:
Player.NervePot = False
StatusInterp("Stun", Foe, Player, 1)
#Stun(1, Player, Foe)
if Name == "NerveElixir": #The first time the foe gains poison, give them 3 stun
if Player.NerveElixir:
Player.NerveElixir = False
StatusInterp("Stun", Foe, Player, 3)
#Stun(3, Player, Foe)
if Name == "OreHeart": #Gain 3 armor per equipped stone item
c = Count(Player, "Stone")
#Player.Armor = Player.Armor + 3*c
ArmorGain(Player, Foe, 3*c)
if Name == "PineconeBreastplate": #If HP = max HP at BatStart then gain PineconeBreastplateTS item
if Player.MaxHP == Player.CurrentHP:
#Search Player.Items() to replace "PineconeBreastplate" with "PineconeBreastplateTS"
Player.Items = [word.replace("PineconeBreastplate", "PineconeBreastplateTS") for word in Player.Items]
if Name == "PineconeBreastplateTS":
StatusInterp("Thorns", Player, Foe, 1)
#GainThorns(Player, Foe, 1) #CheckThornsGain
if Name == "PlatedGreaves": #Convert 3 speed to 9 armor
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Speed >= 1:
ArmorGain(Player, Foe, 3*Player.Speed)
Player.Speed = Player.Speed - min(Player.Speed, 3)
#Player.Armor = Player.Armor + 9
if Name == "PoisonousMushroom": #Gain 1 poison
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
if Name == "PurelakeArmor": #Exposed: Remove 1 purity to gain 5 armor
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Purity > 0:
#GainPurity(Player, Foe, -1)
StatusInterp("Purity", Player, Foe, -1)
ArmorGain(Player, Foe, 5)
if Name == "PurelakePotion": #Remove all armor and gain 3 purity
SelfArmorLose(Player, Foe, Player.Armor)
StatusInterp("Purity", Player, Foe, 3)
#GainPurity(Player, Foe, 3)
if Name == "PurelakeElixir": #Lose 5 armor and gain 5 purity
Player.Armor = Player.Armor - min(5, Player.Armor)
ArmorLose(Player, Foe)
StatusInterp("Purity", Player, Foe, 5)
#GainPurity(Player, Foe, 5)
if Name == "PurelakeTome": #CD 3: if you have purity, remove 1. Else gain 1. Reset cd
if (Player.Cooldown%(np.ceil(3*Player.CooldownMult) - Player.CooldownReduction) == 0) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeTriggers):
if Player.Purity > 0:
#GainPurity(Player, Foe, -1)
StatusInterp("Purity", Player, Foe, -1)
elif Player.Purity == 0:
StatusInterp("Purity", Player, Foe, 1)
#GainPurity(Player, Foe, 1)
Cooldowned(Player, Foe)
#if Name == "RiverflowTalisman": #Whenever you gain a status, gain 1 more
if Name == "RiverflowViolin": #Gain 4 armor
for nn in range(0, Player.ExposedMultiTrigger):
ArmorGain(Player, Foe, 4)
Symphony(Player, Foe, "RiverflowViolin")
if Name == "RiverflowViolinS": #Gain 4 armor
ArmorGain(Player, Foe, 4)
if Name == "RoyalHelmet": #Gain 10 armor IF you have more than 20 gold
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Gold > 20: #Might work like >= in game
#Player.Armor = Player.Armor + 10
ArmorGain(Player, Foe, 10)
if Name == "RustedPlate": #If the foe loses armor to acid, you gain that armor
ArmorGain(Player, Foe, Foe.DeltaArmor)
Foe.DeltaArmor = 0
if Name == "SaltcrustedCrown": #gain 1 riptide
StatusInterp("Riptide", Player, Foe, 1)
#GainRiptide(Player, Foe, 1)
if Name == "SanguineRose": #When healed heal again for 1 hp
l = 1
if Player.CurrentHP/Player.MaxHP < 0.5:
l = Player.TwilightCrestMult
v = 1
if Player.Stun > 0: #
v = Player.VampireCloak
x = Player.CurrentHP - Player.MaxHP + 1*Player.SanguineMult*l*v*Player.SanguineScepterMult
if Healable(Player):
Player.CurrentHP = min(Player.MaxHP, Player.CurrentHP + 1*Player.SanguineMult*l*v*Player.SanguineScepterMult)
Player.Search("HPRestoredS", Foe)
if "HPOverHeal" in Player.Items and x > 0:
DealDamage(x, Player, Foe)
if Name == "SilverAnchor": #Whenever you lose speed, give the foe 1 riptide
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "SilverscaleArmor": #Whenever riptide triggers, gain 2 armor
ArmorGain(Player, Foe, 2)
if Name == "SilverscaleGreaves": #If you have more speed, give foe 2 riptide
if Player.Speed > Foe.Speed:
StatusInterp("Riptide", Foe, Player, 2)
#GainRiptide(Foe, Player, 2)
if Name == "SinfulMirror": #Remove all your purity
StatusInterp("Purity", Player, Foe, -Player.Purity)
#GainPurity(Player, Foe, -Player.Purity)
if Name == "SlimeBomb": #Remove all their acid, and deal 2 damage per acid removed
BombDamage(2*Foe.Acid, Player, Foe) #With powder keg does it really do the damage 3 times?
StatusInterp("Acid", Foe, Player, -Foe.Acid)
#GainAcid(Foe, Player, -Foe.Acid)
if Name == "SlimeBooster": #Convert 1 acid to 2 attack
if Player.Acid > 0:
StatusInterp("Acid", Player, Foe, -1)
#GainAcid(Player, Foe, -1)
Player.Attack = Player.Attack + 2
if Name == "SlimeHeart": #Remove all your acid and restore 2 hp per acid removed
if Player.Acid > 0:
HealingCalc(Player, Foe, 2*Player.Acid)
StatusInterp("Acid", Player, Foe, -Player.Acid)
#GainAcid(Player, Foe, -Player.Acid)
if Name == "SlimePotion": #Gain armor = missing hp and gain 5 acid.
ArmorGain(Player, Foe, Player.MaxHP-Player.CurrentHP)
StatusInterp("Acid", Player, Foe, 5)
#GainAcid(Player, Foe, 5)
if Name == "SlimeElixir": #Gain armor = max hp and gain 5 acid.
ArmorGain(Player, Foe, Player.MaxHP)
StatusInterp("Acid", Player, Foe, 5)
#GainAcid(Player, Foe, 5)
if Name == "SmokeBomb": #If less speed than foe, then gain 3 speed and give foe 3 powder
#Maybe it only does the check once and then triggers twice??
#for nn in range(1, Player.Bombtrigger):
if Player.Speed < Foe.Speed:
#Player.Speed = Player.Speed + 3
Player.DeltaSpeed = 3
GainSpeed(Player, Foe, 3)
#Foe.Powder = Foe.Powder + 3
if Name == "SpiralShell": #If Stunned, give foe 1 riptide
if Player.Stun > 0:
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "SpiritualBalance": #If your speed = attack. gain 3 attack
if Player.Speed == Player.Attack:
Player.Attack = Player.Attack + 3
if Name == "StoneSteak": #If HP = MaxHP, gain 5 armor
if Player.MaxHP == Player.CurrentHP:
#Player.Armor = Player.Armor + 5
ArmorGain(Player, Foe, 5)
if Name == "StormcloudArmor": #If you have more speed than armor, stun foe for 2 turns
if Player.Speed > Player.Armor:
StatusInterp("Stun", Foe, Player, 2)
#Stun(2, Player, Foe)
if Name == "StormcloudCurse": #Stun yourself and the foe for 2 turns
StatusInterp("Stun", Player, Foe, 2)
StatusInterp("Stun", Foe, Player, 2)
#Stun(2, Player, Foe)
#Stun(2, Foe, Player)
if Name == "SunlightCrest": #If you're above 50% hp, lose 3 hp and gain 1 attack
if Player.CurrentHP/Player.MaxHP > 0.5:
Player.CurrentHP = Player.CurrentHP - 3
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
Player.Attack = Player.Attack + 1
TakeDamage(Player, Foe)
if Name == "SwiftstrikeCrown": #Spend 5 speed to perm gain 1 extra strike~~~~~Adds x2 when having the specifc weapon
if Player.Speed >= 5:
GainSpeed(Player, Foe, -5)
Player.BaseStrikesCount = Player.BaseStrikesCount + 1
if Name == "TempestBreastplate": #Gain speed = base armor
for nn in range(0, Player.ExposedMultiTrigger):
if Player.BaseArmor > 0:
#Player.Speed = Player.Speed + Player.BaseArmor
Player.DeltaSpeed = Player.BaseArmor
GainSpeed(Player, Foe, Player.BaseArmor)
if Name == "ThornRing": #Take 5 damage and gain 10 thorns
#DealDamage(1, Foe, Player)
for nn in range(0, Player.RingTrigger):
SelfArmorLose(Player, Foe, 5) #Trigger SelfArmorLosecheck and then damage
if Player.MaxHP - Player.CurrentHP > 0:
StatusInterp("Thorns", Player, Foe, 10)
#GainThorns(Player, Foe, Player.MaxHP - Player.CurrentHP)
if Name == "ThunderCloud": #On Wounded: stun foe for 3
StatusInterp("Stun", Foe, Player, 3)
if Name == "ToxicAlgae": #Give the foe 5 poison
StatusInterp("Poison", Foe, Player, 5)
#GainPoison(Foe, Player, 5)
if Name == "ToxicRose": #Whenever you restore hp, give foe 1 poison
StatusInterp("Poison", Foe, Player, 1)
#GainPoison(Foe, Player, 1)
if Name == "TwistedRoot": #Gain 1 regen per equipped wood
for nn in range(0, Player.ExposedMultiTrigger):
c = Count(Player, "Wood")
if c > 0: StatusInterp("Regen", Player, Foe, c)
#GainRegen(Player, Foe, c)
if Name == "VampiricStasis": #Whenever you skip your strike, restore 3 HP
Sanguine(Player, Foe, 3)
if Name == "ViperExtract": #First time foe gains poison, give them 3 more
if Player.ViperPot:
Player.ViperPot = False
StatusInterp("Poison", Foe, Player, 3)
#GainPoison(Foe, Player, 3)
if Name == "ViperElixir": #First time foe gains poison, give them 9 more
if Player.ViperElixir:
Player.ViperElixir = False
StatusInterp("Poison", Foe, Player, 9)
#GainPoison(Foe, Player, 9)
if Name == "AcidMutation": #gain 1 Acid
if any(p in ("BattleStart") for p in Phase): #if Phase == "BattleStart":
StatusInterp("Acid", Player, Foe, 1)
if any(p in ("PreStrike") for p in Phase):
if Player.Acid > 0:
Player.TempAttack = Player.TempAttack + Player.Acid
#GainAcid(Player, Foe, 1)
#Player.Items = [word.replace("AcidMutation", "AcidMutationPS") for word in Player.Items]
# if Name == "AcidMutationPS": #Gain temp attack = to acid
# if Player.Acid > 0:
# Player.TempAttack = Player.TempAttack + Player.Acid
if Name == "AcidicWitherleaf": #Give the foe acid = to your speed
if Player.Speed > 0:
StatusInterp("Acid", Foe, Player, Player.Speed)
#GainAcid(Foe, Player, Player.Speed)
if Name == "AssaultGreaves": #Deal 1 damage
DealDamage(1, Player, Foe)
if Name == "BlackbriarArmor": #Whenever you take damage, gain 2 thorns
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
if Name == "BloodstoneRing": #BS: Gain 5 max hp and restore 5 hp
for nn in range(0, Player.RingTrigger):
Player.MaxHP = Player.MaxHP + 5
#Dont think wounded can trigger?
#Player.Wounded(Foe)
Sanguine(Player, Foe, 5)
if Name == "BrittlebarkArmor": #Take another damage
#This might not infinite selfloop
if Player.NoBBB:
if "SelfArmorLose" in Player.Items:
if Player.Armor >= 1:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 1)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
Player.DeltaArmor = 1
ArmorLose(Player, Foe)
#Player.DeltaArmor = 0
ArmorGain(Player, Foe, Player.DeltaArmor)
Player.DeltaArmor = 0
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
else:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 1)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
Player.Armor = max(0, Player.Armor - 1)
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
else:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 1)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
if Player.Armor >= 1:
Player.DeltaArmor = 1
ArmorLose(Player, Foe)
Player.DeltaArmor = 0
Player.Armor = max(0, Player.Armor - 1)
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
if Name == "CactusCap": #Convert armor to thorns
Player.Armor = Player.Armor
#if Player.Armor >= 1:
#x = np(Player.Armor)
#SelfArmorLose(Player, Foe, Player.Armor)
#StatusInterp("Thorns", Player, Foe, x)
#GainThorns(Player, Foe, x)
if Name == "ChainmailArmor": #RegainBaseArmor
if Player.BaseArmor > 0:
#Player.Armor = Player.BaseArmor + Player.Armor
ArmorGain(Player, Foe, Player.BaseArmor)
if Name == "ClearspringDuck": #Gain 1 armor and decrease a random status effect by 1
ArmorGain(Player, Foe, 1)
[Status, Stacks] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if Name == "CrimsonCloak": #Restore 1 HP
Sanguine(Player, Foe, 1)
#if Name == "DruidsCloak" : {"Unique", "HPLose", "CantHeal"}, #Whenever you lose hp, gain that much armor. Cannot restore hp
if Name == "EmeraldGemstone": #Battle Start: If Foe has more max hp than you, set your max hp to theirs.
if Foe.MaxHP > Player.MaxHP:
Player.MaxHP = Foe.MaxHP
if Name == "ExplosiveArrow": #If foe doesnt have armor, deal 3 damage
if Foe.Armor == 0:
BombDamage(3, Player, Foe)
if Name == "GrandTome": #CD 10: Retriggers all other tomes
if (Player.Cooldown + Player.CooldownReduction > np.ceil(10*Player.CooldownMult) and Player.GrandTome):
for nn in range(0, Player.TomeTriggers):
Player.GrandTome = False
Player.GrandTomeRetriggers = True
Player.Search("Tome", Foe)
Player.GrandTomeRetriggers = False
Cooldowned(Player, Foe)
if Name == "IronTransfusion": #Gain 2 armor lose 1 hp
Player.CurrentHP = Player.CurrentHP - 1
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
#Player.Armor = Player.Armor + 2
ArmorGain(Player, Foe, 2)
TakeDamage(Player, Foe)
if Name == "IronskinPotion": #Gain armor = missing hp
if Healable(Player):
#Player.Armor = Player.Armor + Player.MaxHP - Player.CurrentHP
ArmorGain(Player, Foe, Player.MaxHP - Player.CurrentHP)
if Name == "IronskinElixir": #gain 20 max hp. Gain armor = missing hp
Player.MaxHP = Player.MaxHP + 20
Player.Wounded(Foe)
ArmorGain(Player, Foe, Player.MaxHP - Player.CurrentHP)
if Name == "IronstoneArmor": #Enemy strikes deal 2 less damage while you have armor
if Player.Armor > 0:
Player.StrikeReduction = Player.StrikeReduction + 2
if Name == "LifeZap": #Lose all your hp except 1 and stun the foe for 2 turns
if Player.CurrentHP > 1:
Player.CurrentHP = 1
HP1Check(Player, Foe)
TakeDamage(Player, Foe)
else:
HP1Check(Player, Foe)
StatusInterp("Stun", Foe, Player, 2)
#Stun(2, Foe, Player)
if Name == "LifebloodArmor": #Convert 50% of current hp rounded down to x armor
x = np.floor(Player.CurrentHP / 2)
Player.CurrentHP = Player.CurrentHP - x
HP1Check(Player, Foe)
if x > 0:
TakeDamage(Player, Foe) #Maybe LBA doesnt activate take damage effects
#Player.Armor = Player.Armor + 2*x
ArmorGain(Player, Foe, x)
if Name == "LifebloodBurst": #Whenever you restore 3 or more hp, deal 3 damage
BombDamage(3, Player, Foe)
# if Name == "LifebloodBurst": #Deal 50% rounded down of your hp to foe
# DealDamage(np.floor(Player.MaxHP / 2), Player, Foe)
if Name == "LiferootBeast": #If you have 0 regen, gain 3 regen
if Player.Regen == 0:
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
if Name == "LiferootLute": #Gain 3 regen
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
Symphony(Player, Foe, "LiferootLute")
if Name == "LiferootLuteS": #Gain 3 regen
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
if Name == "MoonlightShield": #If you are below 50% hp, gain 2 armor
if Player.CurrentHP/Player.MaxHP < 0.5:
ArmorGain(Player, Foe, 2)
if Name == "NoxiousGas": #Both you and the foe get 1 poison
StatusInterp("Poison", Player, Foe, 1)
StatusInterp("Poison", Foe, Player, 1)
#GainPoison(Player, Foe, 1)
#GainPoison(Foe, Player, 1)
if Name == "OverchargedOrb": #Stun the foe for 3 turns
StatusInterp("Stun", Foe, Player, 3)
#Stun(3, Player, Foe)
if Name == "PetrifiedStatue": #Give the foe 1 stun per stone equipped PetrifiedStatue
StatusInterp("Stun", Foe, Player, Count(Player, "Stone"))
#Stun(Count(Player, "Stone"), Player, Foe)
if Name == "PlatedHelmet": #If below 50% hp, gain 2 armor
if Player.MaxHP/2 > Player.CurrentHP:
#Player.Armor = Player.Armor + 2
ArmorGain(Player, Foe, 2)
if Name == "PurelakeChalice": #Gain 1 purity eot
StatusInterp("Purity", Player, Foe, 1)
#GainPurity(Player, Foe, 1)
if Name == "RazorBreastplate": #Gain thorns = foe's attack
if Foe.Attack > 0: #Idk if you can gain negative thorns
StatusInterp("Thorns", Player, Foe, Foe.Attack)
#GainThorns(Player, Foe, Foe.Attack)
# if Name == "PowderKeg": #Give foe 1 powder
# Foe.Powder = Foe.Powder + 1
if Name == "RoyalShield": #Convert 1 gold to 3 armor
if Player.Gold > 0:
Player.Gold = Player.Gold - 1
ArmorGain(Player, Foe, 3)
if Name == "RubyGemstone": #If your attack is 1, deal 4 extra damage
if Player.Attack == 1:
DealDamage(4, Player, Foe)
#Nonweapon damagecheck
if Name == "SanguineImp": #Deal 1 damage and restore 1 hp
DealDamage(1, Player, Foe)
Sanguine(Player, Foe, 1)
if Name == "SanguineMorphosis": #Stun yourself and gain 3 regen
if Player.TurnCounter%4 == 0:
StatusInterp("Stun", Player, Foe, 1)
#Stun(1, Foe, Player)
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
if Name == "SapphireGemstone": #When ever you lose armor restore than much hp
if Player.CurrentHP/Player.MaxHP < 0.5:
Player.DeltaArmor = Player.DeltaArmor*Player.TwilightCrestMult
if Player.Stun > 0:
Player.DeltaArmor = Player.DeltaArmor*Player.VampireCloak
x = (Player.CurrentHP + Player.DeltaArmor*Player.SanguineScepterMult) - Player.MaxHP #Overheal Value
if Healable(Player):
Player.CurrentHP = max(Player.MaxHP, Player.CurrentHP + Player.DeltaArmor*Player.SanguineScepterMult)
Player.DeltaArmor = 0
HPRestored(Player, Foe)
if "HPOverHeal" in Player.Items and x > 0:
Player.DeltaArmor = 0
DealDamage(x, Player, Foe)
if Name == "SerpentMask": #Give the foe poison = to attack
StatusInterp("Poison", Foe, Player, Player.Attack + Player.TempAttack)
#GainPoison(Foe, Player, Player.Attack + Player.TempAttack)
if Name == "SheetMusic": #CD 6: Trigger Symphony 3 times
if (Player.Cooldown + Player.CooldownReduction > np.ceil(6*Player.CooldownMult) and Player.SheetMusic) or Player.GrandTomeRetriggers:
for nn in range(0, Player.SheetMusic):
for mm in range(0, 3):
Symphony(Player, Foe, "")
Cooldowned(Player, Foe)
Player.SheetMusic = False
if Name == "ShieldTalisman":
Player.Armor = Player.Armor + 1
Player.GainedArmor = True
#Player.Search("ArmorGainS", Foe)
if Name == "SilverscaleGauntlet": #Give 1 riptide eot
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "StonebornTurtle": #Restore 1 hp, unless hp is full then gain 2 armor
if Player.MaxHP > Player.CurrentHP:
HealingCalc(Player, Foe, 1)
elif Player.MaxHP == Player.CurrentHP:
ArmorGain(Player, Foe, 2)
if Name == "StormcloudDrum": #Give the foe 1 stun
StatusInterp("Stun", Foe, Player, 1)
#Stun(1, Player, Foe)
Symphony(Player, Foe, "StormcloudDrum")
if Name == "StormcloudDrumS": #Give the foe 1 stun
StatusInterp("Stun", Foe, Player, 1)
#Stun(1, Player, Foe)
if Name == "StuddedGauntlet": #Deal 1 damage
DealDamage(1, Player, Foe)
if Name == "SwiftstrikeCloak": #If you have more speed than foe, gain an additional strike
if Player.Speed > Foe.Speed:
GainStrikes(Player, Foe, 1)
if Name == "SwiftstrikeGauntlet": #Gain 2 additional strikes next turn
GainStrikes(Player, Foe, 2)
if Name == "SwordTalisman": #deal 1 more damage
Foe.CurrentHP = min(Foe.CurrentHP, Foe.CurrentHP + Foe.Armor - 1) #Updates hp of foe if foe's armor reached 0
Player.AliveCheck(Foe)
Death(Foe)
HP1Check(Foe, Player)
if Foe.Armor > 0:
Foe.DeltaArmor = max(min(Foe.Armor, 1), 0)
ArmorLose(Foe, Player)
Foe.DeltaArmor = 0
Foe.Armor = max(0, Foe.Armor - 1)
TakeDamage(Foe, Player)
if Name == "TimeBomb": #Exposed deal 1 damage. This item does 2 more damage for each start turn passed.
for nn in range(0, Player.ExposedMultiTrigger):
BombDamage(1 + 2*Player.TurnCounter, Player, Foe)
if Name == "TomeOfTheHero": #CD 8: Gain 4 attack, 4 armor, and 4 speed
if (Player.Cooldown + Player.CooldownReduction > np.ceil(8*Player.CooldownMult) and Player.TomeOfTheHero) or Player.GrandTomeRetriggers:
for nn in range(0, Player.TomeOfTheHero):
Player.Attack = Player.Attack + 4
ArmorGain(Player, Foe, 4)
GainSpeed(Player, Foe, 4)
Cooldowned(Player, Foe)
Player.TomeOfTheHero = False
if Name == "WeaverArmor": #If you have 0 base armor, gain armor = current hp
if Player.BaseArmor == 0:
ArmorGain(Player, Foe, Player.CurrentHP)
# if Name == "FeatherweightGreaves": #Lose all speed and deal 2 damage per speed lost
# if Player.Speed > 0:
# x = np.copy(Player.Speed)
# Player.Speed = 0
# DealDamage(2*x, Player, Foe)
if Name == "GraniteThorns": #Needs a counter to not remove thorns
Player.ThornsTriggers = 3
if Name == "PrimeForm": #Double attack while hp is full
if Player.CurrentHP == Player.MaxHP:
Player.StrikeMult = 2*Player.StrikeMult
if Name == "RazorScales": #If you lose armor, deal damage
x = np.copy(Player.DeltaArmor)
Player.DeltaArmor = 0 #Changing to 0 first prevents possible random loops
DealDamage(x, Player, Foe)
if Name == "SerpentScalemail": #Give the foe 2 poison
StatusInterp("Poison", Foe, Player, 2)
if Name == "StormtideAnchor": #Stun foe 1 whenever riptide triggers
StatusInterp("Stun", Foe, Player, 1)
if Name == "BitterMelon": #Convert 1 stack of another status effect to 1 poison
[Status, Stacks] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if Stacks > 0:
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
if Name == "BloodOrange": #Gain 3 acid
if any(p in ("Wounded") for p in Phase): #if Phase == "Wounded":
if Player.Acid > 0:
x = Player.Acid
StatusInterp("Acid", Player, Foe, -Player.Acid)
StatusInterp("Regen", Player, Foe, x)
if any(p in ("BattleStart") for p in Phase):
StatusInterp("Acid", Player, Foe, 3)
# if Name == "BloodOrange": #Gain 3 acid
# StatusInterp("Acid", Player, Foe, 3)
# #GainAcid(Player, Foe, 3)
# replaced = False
# for jj in range(0, len(Player.Items)):
# if not replaced and Player.Items[jj] == "BloodOrange":
# Player.Items[jj] = "BloodOrangeW"
# replaced = True
# if Name == "BloodOrangeW": #Convert all acid to regen
# #Probably doesnt count as sanguine healing surely
# if Player.Acid > 0:
# x = Player.Acid
# StatusInterp("Acid", Player, Foe, -Player.Acid)
# StatusInterp("Regen", Player, Foe, x)
if Name == "BloodSausage": #Restore 1 hp 5 times
for i in range(0, 5):
Sanguine(Player, Foe, 1)
if Name == "BloodySteak" : #Restore 10 hp and 5 armor
HealingCalc(Player, Foe, 10)
#Player.Armor = Player.Armor + 5
ArmorGain(Player, Foe, 5)
if Name == "BoiledHam": #Decrease all status effects by 1
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
if Player.Thorns > 0:
#Player.Thorns = Player.Thorns - 1
StatusInterp("Thorns", Player, Foe, -1)
#ThornsLose(Player, Foe, 1)
if Player.Freeze > 0:
StatusInterp("Freeze", Player, Foe, -1) #Freeze(-1, Foe, Player)
if Player.Regen > 0:
StatusInterp("Regen", Player, Foe, -1) #GainRegen(Player, Foe, -1)
if Player.Poison > 0:
StatusInterp("Poison", Player, Foe, -1) #GainPoison(Player, Foe, -1)
if Player.Stun > 0:
StatusInterp("Stun", Player, Foe, -1) #Stun(-1, Foe, Player)
if Player.Riptide > 0:
StatusInterp("Riptide", Player, Foe, -1) #GainRiptide(Player, Foe, -1)
if Player.Acid > 0:
StatusInterp("Acid", Player, Foe, -1) #GainAcid(Player, Foe, -1)
if Player.Purity > 0:
StatusInterp("Purity", Player, Foe, -1) #GainPurity(Player, Foe, -1)
if Name == "CandiedNuts": #Gain 3 thorns, thorns do 2x
Player.Thorns = Player.Thorns + 3
if Name == "CherryCocktail": #Deal 3 damage and restore 3 hp
#for nn in range(1, Player.Bombtrigger):
BombDamage(3, Player, Foe)
Sanguine(Player, Foe, 3)
if Name == "CombustibleLemon": #Spend 1 speed to deal 2 bomb damage
if Player.Speed > 0:
GainSpeed(Player, Foe, -1)
BombDamage(2, Player, Foe)
if Name == "DeepseaWine": #Give foe 1 riptide. Whenever a riptide triggers restore 3 hp
if any(p in ("Wounded") for p in Phase):
StatusInterp("Riptide", Foe, Player, 1)
if any(p in ("RiptideDamage") for p in Phase):
HealingCalc(Player, Foe, 3)
if Name == "ExplosiveFish": #Give foe 1 riptide and deal 2xfoe.riptide bombdamage
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
BombDamage(2*Foe.Riptide, Player, Foe)
if Name == "ExplosiveRoast": #Deal 1 damage 3 times
#Might be other order
for nn in range(0, 3):
BombDamage(1, Player, Foe)
if Name == "GraniteCherry": #If your hp is full, gain 2 armor and deal 2 damage 3 times
if Player.CurrentHP == Player.MaxHP:
for ll in range(0, 3):
ArmorGain(Player, Foe, 2)
BombDamage(2, Player, Foe)
if Name == "HoneyCaviar": #Give foe 10 riptide
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Riptide", Foe, Player, 10)
#GainRiptide(Foe, Player, 10)
if Name == "HoneydewMelon": #Give all your status effects to the foe
if Player.Thorns > 0:
x = Player.Thorns
StatusInterp("Thorns", Player, Foe, -x)
StatusInterp("Thorns", Foe, Player, x)
if Player.Freeze > 0:
x = Player.Freeze
StatusInterp("Freeze", Player, Foe, -x)
StatusInterp("Freeze", Foe, Player, x)
if Player.Regen > 0:
x = Player.Regen
StatusInterp("Regen", Player, Foe, -x)
StatusInterp("Regen", Foe, Player, x)
if Player.Poison > 0:
x = Player.Poison
StatusInterp("Poison", Player, Foe, -x)
StatusInterp("Poison", Foe, Player, x)
if Player.Stun > 0:
x = Player.Stun
StatusInterp("Stun", Player, Foe, -x)
StatusInterp("Stun", Foe, Player, x)
if Player.Riptide > 0:
x = Player.Riptide
StatusInterp("Riptide", Player, Foe, -x)
StatusInterp("Riptide", Foe, Player, x)
if Player.Acid > 0:
x = Player.Acid
StatusInterp("Acid", Player, Foe, -x)
StatusInterp("Acid", Foe, Player, x)
if Player.Purity > 0:
x = Player.Purity
StatusInterp("Purity", Player, Foe, -x)
StatusInterp("Purity", Foe, Player, x)
if Name == "HoneyglazedShroom": #Give the foe 2 poison
StatusInterp("Poison", Foe, Player, 2)
#GainPoison(Foe, Player, 2)
if Name == "HornedMelon": #Decrease 2 random status effects by 1 and gain that many thorns
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount): #Probably shouldnt decrease thorns
[Status, Stacks1] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
[Status, Stacks2] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if Stacks1 + Stacks2 > 0:
StatusInterp("Thorns", Player, Foe, Stacks1 + Stacks2)
#GainThorns(Player, Foe, Stacks1 + Stacks2)
if Name == "LemonRoast": #Gain 2 acid
StatusInterp("Acid", Player, Foe, 2)
#GainAcid(Player, Foe, 2)
if Name == "LemonShark": #Gain 1 acid
if any(p in ("BattleStart") for p in Phase): #if Phase == "BattleStart":
StatusInterp("Acid", Player, Foe, 1)
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
for nn in range(0, Player.ExposedMultiTrigger):
if Player.Acid > 0:
StatusInterp("Riptide", Foe, Player, Player.Acid)
#GainAcid(Player, Foe, 1)
#Player.Items = [word.replace("LemonShark", "LemonSharkE") for word in Player.Items]
# replaced = False
# for jj in range(0, len(Player.Items)):
# if not replaced and Player.Items[jj] == "LemonShark":
# Player.Items[jj] = "LemonSharkE"
# replaced = True
# if Name == "LemonSharkE": #Give the foe riptide = your acid
# StatusInterp("Riptide", Foe, Player, Player.Acid)
# #GainRiptide(Foe, Player, Player.Acid)
if Name == "LemonSyrup": #Double your speed
GainSpeed(Player, Foe, Player.Speed)
if Name == "LimestoneFruit": #Gain 8 armor, if hp isnt full gain 2 acid
ArmorGain(Player, Foe, 8)
if Player.CurrentHP != Player.MaxHP:
StatusInterp("Acid", Player, Foe, 2)
#GainAcid(Player, Foe, 2)
if Name == "MarbleMushroom": #Gain 3 poison
StatusInterp("Poison", Player, Foe, 3)
#GainPoison(Player, Foe, 3)
if Name == "MarbledStonefish": #If you hp is full, gain 5 armor and give foe 1 riptide
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
if Player.CurrentHP == Player.MaxHP:
ArmorGain(Player, Foe, 5)
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "MelonBomb": #Decrease a random status effect by 1. I believe both effects currently should trigger 3 times with powder keg but only the damage does
if any(p in ("BattleStart", "Wounded") for p in Phase): #if Phase in ("BattleStart", "Wounded"):
[Status, Stacks1] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
for nn in range(0, Player.ExposedMultiTrigger):
[Status, Stacks1] = Player.RandomStatus(Foe, -1, True) #This automagically changes a random self status effect
if any(p in ("LoseStatus") for p in Phase): #Whenever a status effect is decreased, deal 1 damage to foe.
BombDamage(1, Player, Foe)
if Name == "MelonLemonade": #Remove all your acid
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
if Player.Acid > 0:
StatusInterp("Acid", Player, Foe, -Player.Acid)
#GainAcid(Player, Foe, -Player.Acid)
if Name == "MelonWine": #Decrease a random status by 1 and restore 3 hp
if any(p in ("BattleStart", "Wounded") for p in Phase): #if Phase in ("BattleStart", "Wounded"):
[Status, Stacks] = Player.RandomStatus(Foe, -1, True)
if Stacks > 0:
HealingCalc(Player, Foe, 3)
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
for nn in range(0, Player.ExposedMultiTrigger):
[Status, Stacks] = Player.RandomStatus(Foe, -1, True)
if Stacks > 0:
HealingCalc(Player, Foe, 3)
if Name == "MineralWater": #If HP is full, decrease a random status by 2 and gain 5 armor
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
if Player.MaxHP == Player.CurrentHP:
[Status, Stacks] = Player.RandomStatus(Foe, -2, True)
ArmorGain(Player, Foe, 5)
if Name == "MushroomSoup": #Gain 1 poison and 1 regen
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
StatusInterp("Regen", Player, Foe, 1)
#GainRegen(Player, Foe, 1)
if Name == "PetrifiedChestnut": #If hp is full, gain 6 thorns and 6 armor
if Player.MaxHP == Player.CurrentHP:
#GainThorns(Player, Foe, 6)
StatusInterp("Thorns", Player, Foe, 6)
#Player.Armor = Player.Armor + 6
ArmorGain(Player, Foe, 6)
if Name == "PoisonousDurian": #Gain 1 poison and 1 thorns
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
StatusInterp("Thorns", Player, Foe, 1)
#GainThorns(Player, Foe, 1)
if Name == "PoisonousLemon": #Gain 1 acid and 5 poison
StatusInterp("Acid", Player, Foe, 1)
#GainAcid(Player, Foe, 1)
StatusInterp("Poison", Player, Foe, 5)
#GainPoison(Player, Foe, 5)
if Name == "PoisonousPufferfish": #Gain 3 poison and give foe 2 riptide
StatusInterp("Poison", Player, Foe, 3)
#GainPoison(Player, Foe, 3)
StatusInterp("Riptide", Foe, Player, Player.Poison)
#GainRiptide(Foe, Player, 2)
if Name == "PowderCookie": #Gain 3 thorns and give foe 3 powder
StatusInterp("Thorns", Player, Foe, 3)
#GainThorns(Player, Foe, 3)
Foe.Powder = Foe.Powder + 3
if Name == "RoastedChestnut": #Gain 4 thorns
StatusInterp("Thorns", Player, Foe, 4)
#GainThorns(Player, Foe, 4)
if Name == "RockCandy": #Gain 15 armor, if hp is full gain 15 more. I think its individual
ArmorGain(Player, Foe, 15)
if Player.CurrentHP == Player.MaxHP:
ArmorGain(Player, Foe, 15)
if Name == "SharkRoast": #Give foe 2 riptide
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Riptide", Foe, Player, 2)
#GainRiptide(Foe, Player, 2)
if Name == "SpikedWine": #Gain 5 thorns and restore 5 hp
StatusInterp("Thorns", Player, Foe, 5)
#GainThorns(Player, Foe, 5)
HealingCalc(Player, Foe, 5)
if Name == "SpinyKiwifruit": #Gain 3 acid and gain thorns = acid
StatusInterp("Acid", Player, Foe, 3)
#GainAcid(Player, Foe, 3)
if Player.Acid > 0:
StatusInterp("Thorns", Player, Foe, Player.Acid)
#GainThorns(Player, Foe, Player.Acid)
if Name == "SpinySnapper": #Give foe 1 riptide. Whenever riptide triggers, gain 3 thorns
if any(p in ("BattleStart") for p in Phase):
StatusInterp("Riptide", Foe, Player, 1)
if any(p in ("RiptideDamage") for p in Phase):
StatusInterp("Thorns", Player, Foe, 3)
if Name == "SugarBomb": #Deal 1 damage 3 times
for nn in range(0, 3):
BombDamage(1, Player, Foe)
# Foe.Powder = max(0, Foe.Powder - 1)
if Name == "SweetWine":
HealingCalc(Player, Foe, 30)
if Name == "ToxicCherry": #Gain 1 poison and deal 1 damage to foe
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
BombDamage(1, Player, Foe)
if Name == "TrailMix": #Deal 1 damage and gain 1 thorn 4 times
for ll in range(0, 3):
BombDamage(1, Player, Foe)
StatusInterp("Thorns", Player, Foe, 1)
#GainThorns(Player, Foe, 1)
if Name == "UnderwaterWatermelon": #Decrease 1 random status effect and give foe 1 riptide
Amount = 1
if any(p in ("Exposed") for p in Phase):
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
[Status, Stacks] = Player.RandomStatus(Foe, -1, True)
StatusInterp("Riptide", Foe, Player, 1)
if Name == "BloodRune": #Wounded: Retriggers the last triggered wounded item.
Check = True
for xx in range(0, len(Player.Items)):
if Player.Items[xx] == "BloodRune":
Index = xx
#Index = Player.Items.index("BloodRune")
for nn in range(int(Index) - 1, -1, -1):
if "Wounded" in ItemTags[Player.Items[nn]] and Check:
Check = False
[Player, Foe] = ItemsEffect("Wounded", Player.Quality[nn], Player.Items[nn], Player, Foe)
if Name == "EchoRune": #Wounded: Retrigger a random batstart item
Player.RandomSearch("BattleStart", Foe)
if Name == "BeltOfGluttony": #Just Stats*
Player.Armor = Player.Armor
if Name == "BootsOfSloth": #Just Stats*
Player.Armor = Player.Armor
if Name == "ChestOfLust": #Just Stats*
Player.Armor = Player.Armor
if Name == "HelmetOfEnvy": #Double foe's Attack
Foe.Attack = 2*Foe.Attack
if Name == "BattleAxe": #Deal 2x if foe is armored. Maybe add "Strike" tag
if Foe.Armor > 0:
Player.StrikeMult = 2*Player.StrikeMult
if Name == "BoomStick": # On hit deal one damage
#for nn in range(1, Player.Bombtrigger): #might retrigger strikes????
BombDamage(1, Player, Foe)
#Foe.Powder = max(0, Foe.Powder - 1)
if Name == "BrittlebarkBow": # After 3 strikes: lose 2 attack p sure triggers once
if Player.StrikeCounter == 3:
Player.Attack = Player.Attack - 2
#Player.StrikeCounter = Player.StrikeCounter + 1
# if Name == "ElderwoodStaff": #Its just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
# if Name == "FeatherweightBlade": #Its just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "ForgeHammer": #Give the enemy 2 armor
#This *might* give the armor at the wrong time
#Foe.Armor = Foe.Armor + 2
ArmorGain(Foe, Player, 2)
if Name == "FungalRapier": #Gain 1 Poison
StatusInterp("Poison", Player, Foe, 1)
#GainPoison(Player, Foe, 1)
if Name == "GaleStaff": #Lose 1 Speed
GainSpeed(Player, Foe, -1)
if Name == "GrillingSkewer": #Gain 1 additional strike(temp)
Player.StrikesCount = Player.StrikesCount + 1
if Name == "Haymaker": # Every 3 strikes gain another one
if Player.StrikeCounter % 3 == 2:
GainStrikes(Player, Foe, 1)
if Name == "HeartDrinker": #On Hit: Restore 1 hp
Sanguine(Player, Foe, 1)
# if Name == "HiddenDagger": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
# if Name == "IronstoneGreatsword": #Just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "IronstoneSpear": #While you have armor, temp gain 2 attack
if Player.Armor > 0:
Player.TempAttack = Player.TempAttack + 2
if Name == "LiferootStaff": #Gain 3 regen when wounded
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
if Name == "MarbleSword": #Exposed: Gain 3 attack
for nn in range(0, Player.ExposedMultiTrigger):
Player.Attack = Player.Attack + 3
if Name == "PacifistStaff": #Gain 1 armor and restore 1 hp
#Player.Armor = Player.Armor + 1
ArmorGain(Player, Foe, 1)
HealingCalc(Player, Foe, 1)
if Name == "RazorthornSpear": #Gain 2 thorns on hit
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
# if Name == "RedwoodRod": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "SilverscaleDagger": #Give 1 Riptide
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "SlimeSword": #Give yourself and the foe 3 acid
StatusInterp("Acid", Player, Foe, 3)
StatusInterp("Acid", Foe, Player, 3)
#GainAcid(Player, Foe, 3)
#GainAcid(Foe, Player, 3)
# if Name == "SpearshieldLance": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "StormcloudSpear": #Every 5 Strikes, stun the enemy for 2 turns. when its divisible by 5.
if Player.StrikeCounter%5 == 0:
StatusInterp("Stun", Foe, Player, 2)
#Stun(2, Player, Foe)
# if Name == "SwordOfTheHero": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
# if Name == "WoodcuttersAxe": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
# if Name == "WoodenStick": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "ArcaneWand": #Cant Attack. TS: Deal 2 + Count(Tome) damage
DealDamage(2 + Count(Player, "Tome"), Player, Foe)
if Name == "BasiliskFang": #Decrease self poison by 2 and give it to foe.
if Player.Poison > 0:
x = min(2, Player.Poison)
StatusInterp("Poison", Player, Foe, -x)
StatusInterp("Poison", Foe, Player, x)
if Name == "BejeweledBlade": # Gains 2 attack per jewelry item in inv
c = Count(Player, "Jewelry")
Player.Attack = Player.Attack + 2*c #Maybe this should be a base stats thing
if Name == "BlackbriarBlade": #Gain 2 attack per thorn you have
Player.TempAttack = Player.TempAttack + 2*Player.Thorns
if Name == "BloodmoonDagger": # Gain 5 attack and take 2 self damage
Player.Attack = Player.Attack + 5
SelfArmorLose(Player, Foe, 2)
if Name == "BloodmoonSickle": # 1 Self damage
SelfArmorLose(Player, Foe, 1)
if Name == "BubblegloopStaff": #Spend 1 speed to give the foe 1 acid and 2 poison
if Player.Speed > 0:
GainSpeed(Player, Foe, -1)
StatusInterp("Acid", Foe, Player, 2)
#GainAcid(Foe, Player, 1)
#GainPoison(Foe, Player, 2)
StatusInterp("Poison", Foe, Player, 2)
if Name == "ExplosiveSword": #Whenever a bomb does 5 or more explosive damage, gain 1 additional strike
GainStrikes(Player, Foe, 1)
# if Name == "ExplosiveSword": #Deal 3 damage (Bomb)
# Player.Attack = Player.Attack
# # for nn in range(1, Player.Bombtrigger):
# # DealDamage(3 + Foe.Powder, Player, Foe)
# # Foe.Powder = max(0, Foe.Powder - 1)
if Name == "FrostbiteDagger": #Give the foe freeze = your attack on hit
Player.FreezeMult = 1
if Player.Freeze > 0:
Player.FreezeMult = 0.5
StrikeMult(Player, Foe)
if np.floor((Player.StrikeMult*(Player.Attack + Player.TempAttack))*Player.FreezeMult) > 0:
StatusInterp("Freeze", Foe, Player, np.floor((Player.StrikeMult*(Player.Attack + Player.TempAttack))*Player.FreezeMult))
#Freeze(np.floor((Player.StrikeMult*(Player.Attack + Player.TempAttack))*FreezeMult), Player, Foe)
Player.StrikeMult = 1
if Name == "GraniteAxe": #Lose 3 hp and gain 3 armor
Player.CurrentHP = Player.CurrentHP - 2
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
#Player.Armor = Player.Armor + 4
ArmorGain(Player, Foe, 4)
TakeDamage(Player, Foe)
if Name == "IcicleSpear": #Give the enemy 1 freeze for each equipped water item
for nn in range(0, Player.ExposedMultiTrigger):
StatusInterp("Freeze", Foe, Player, Count(Player, "Water"))
#Freeze(Count(Player, "Water"), Player, Foe)
if Name == "IronstoneBow": #On hit lose 1 speed. If Speed is 0 or less only attack every other turn
Player.Speed = Player.Speed - 1
if Name == "LifebloodSpear": #Gains attack = first hp restored sounds hard
Player.Attack = Player.Attack + 1
if Name == "LiferootHammer": #Regen that triggers overheal increases max hp. I assume this is before the Overheal gem
if Player.MaxHP == Player.CurrentHP:
X = Player.Regen
ArmorGain(Player, Foe, 3*X)
StatusInterp("Regen", Player, Foe, -Player.Regen)
if Name == "LightningRod": #If stunned, gain 3 attack
if Player.Stun > 0:
Player.Attack = Player.Attack + 3
if Name == "LightningWhip": #If foe is stunned, gain 1 strike
if Foe.Stun > 0:
Player.StrikesCount = Player.StrikesCount + 1
if Name == "RingBlades": #Steal 1 attack from foe
if Foe.Attack > 0:
Foe.Attack = Foe.Attack - 1
Player.Attack = Player.Attack + 1
if Name == "RustySword": #First Turn, On Hit Give the foe acid = your attack
StatusInterp("Acid", Foe, Player, Player.Attack)
#if Name == "SanguineScepter": #Healing doubled
if Name == "SwiftstrikeRapier": #If you have more speed than foe, gain 3 strikes
GainStrikes(Player, Foe, 3)
if Name == "WaveBreaker": #Give the foe 2*(negative base attack) riptide
if Player.Attack < 0:
StatusInterp("Riptide", Foe, Player, 2*(-Player.Attack))
#GainRiptide(Foe, Player, 2*(-Player.Attack))
if Name == "BloodlordsAxe": #Foe loses 5 hp, you restore 5 hp
Foe.CurrentHP = Foe.CurrentHP - 5
Player.AliveCheck(Foe)
Death(Foe)
HP1Check(Foe, Player)
TakeDamage(Foe, Player)
Sanguine(Player, Foe, 5)
if Name == "BrittlebarkClub": #Exp or Wound lose 2 attack
Amount = 1
if any(p in ("Exposed") for p in Phase): #if Phase == "Exposed":
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
if Player.NoBBB:
Player.Attack = Player.Attack - 2
if Name == "ChainmailSword": #Gain armor equal to base armor
for nn in range(0, Player.ExposedMultiTrigger):
ArmorGain(Player, Foe, Player.BaseArmor)
if Name == "FrozenIceblade": #Gain 3 freeze
StatusInterp("Freeze", Player, Foe, 3)
#Freeze(3, Foe, Player)
if Name == "GemstoneScepter": #Gain an on hit effect if you have emerald(+1HP), ruby(+1damage), sapphire(+1Armor), or citrine(+1spd) items
#Might need it to check for all jewelry types simitaneously
HealingCalc(Player, Foe, Count(Player, "Emerald"))
DealDamage(Count(Player, "Ruby"), Player, Foe)
ArmorGain(Player, Foe, Count(Player, "Sapphire"))
Player.DeltaSpeed = Count(Player, "Citrine")
GainSpeed(Player, Foe, Count(Player, "Citrine"))
#for i in range(0, Count(Player, "Emerald")):
#HealingCalc(Player, Foe, 1)
#for i in range(0, Count(Player, "Ruby")):
#DealDamage(1, Player, Foe)
#for i in range(0, Count(Player, "Sapphire")):
#Player.Armor = Player.Armor + 1
#ArmorGain(Player, Foe, 1)
#for i in range(0, Count(Player, "Citrine")):
#Player.Speed = Player.Speed + 1
#Player.DeltaSpeed = 1
#GainSpeed(Player, Foe, 1)
if Name == "GraniteHammer": #Convert 1 armor to 2 attack p sure this the right order to gain the attack
if Player.Armor > 0:
SelfArmorLose(Player, Foe, 1)
Player.Attack = Player.Attack + 2
# if Name == "GraniteLance" : {"Weapon", "Stone"}, #Stat effect 2x base armor
# #base stats
# if Name == "GrindstoneClub" : {"Weapon", "Stone"}, #Effect +2 attack to next weapon equipped (Makes figuring out weapon base stats more annoying)
# #Base stats
if Name == "KingsBlade": #Wounded and Exposed trigger at battle start
Player.WoundTriggers = Player.WoundTriggers - 1
Player.ExposedTriggers = Player.ExposedTriggers - 1
if "BloodChain" in Foe.Items: #I think this doesn't activate items that have battle start, exposed, and wounded 3 times.
Player.MultiSearch(["Wounded", "Exposed"], Foe, ["Wounded", "FoeExposed"]) #It might activate all the faster persons items first instead of a slot by slot check
else:
Player.MultiSearch(["Wounded", "Exposed"], Foe, "FoeExposed")
if Name == "LeatherWhip": #Gain 5 max hp
#Might need to add a check for honey roast
Player.MaxHP = Player.MaxHP + 5
Player.Wounded(Foe)
if Name == "LifestealScythe": #Restore HP = Damage done to HP
Sanguine(Player, Foe, Foe.HPloseFromFoeStrike)
if Name == "MeltingIceblade": #Lose 1 attack
Player.Attack = Player.Attack - 1 #Maybe need to not do this with the HolyCrucifix itemset
if Name == "MoonlightCleaver": #If below 50% hp cannot gain status
if Player.CurrentHP/Player.MaxHP < 0.5:
Player.PreventStatusGain = True
if Name == "PurelakeStaff": #BS: Gain 2 purity. OH: Lose 1 purity
if any(p in ("BattleStart") for p in Phase):
StatusInterp("Purity", Player, Foe, 2)
if Player.Purity > 0 and any(p in ("OnHit") for p in Phase):
StatusInterp("Purity", Player, Foe, -1)
#GainPurity(Player, Foe, 2)
#Player.Items = [word.replace("PurelakeStaff", "PurelakeStaffOH") for word in Player.Items]
#if Name == "PurelakeStaffOH": #BS: Gain 2 purity. OH: Lose 1 purity
#if Player.Purity > 0:
#StatusInterp("Purity", Player, Foe, -1)
#GainPurity(Player, Foe, -1)
if Name == "QuickgrowthSpear": #Gain 1 attack and restore 1 HP
Player.Attack = Player.Attack + 1
HealingCalc(Player, Foe, 1)
if Name == "RiverflowRapier": #First time you gain a new status effect, gain 1 strike
GainStrikes(Player, Foe, 1)
if Name == "RoyalCrownblade": #Gain 1 Gold
if Player.GoldGain:
Player.Gold = Player.Gold + 1
if Name == "RoyalScepter": #Sets attack always equal to gold. Cannot have more than 10 gold
Player.TempAttack = 0
Player.FreezeMult = 1
Player.Gold = min(10, Player.Gold)
Player.Attack = Player.Gold
if Name == "SerpentDagger": #Every 3 strikes give the foe 4 poison
if Player.StrikeCounter%3 == 0:
StatusInterp("Poison", Foe, Player, 4)
#GainPoison(Foe, Player, 4)
if Name == "SilverscaleTrident": #Give 1 riptide
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "StoneslabSword": #Gain 2 armor
#Player.Armor = Player.Armor + 2
ArmorGain(Player, Foe, 2)
if Name == "ThunderboundSabre": #Stun yourself for 2 turns
StatusInterp("Stun", Player, Foe, 2)
#Stun(2, Foe, Player)
if Name == "TwinBlade": #Base strikes count = 2
Player.BaseStrikesCount = 2
if Name == "AncientWarhammer": #OH: Remove all of the foe's armor
ArmorGain(Foe, Player, -Foe.Armor)
if Name == "BearclawBlade": #Attack = Missing HP
Player.TempAttack = 0
Player.FreezeMult = 1
Player.Attack = max(0, Player.MaxHP - Player.CurrentHP) #Shouldnt need max/min aslong as hps work correctly
if Name == "DashmastersDagger": #Gain additional strikes equal to speed
if Player.Speed > 0:
GainStrikes(Player, Foe, Player.Speed)
if Name == "MountainCleaver": #Attack = Base Armor
Player.Attack = Player.BaseArmor
if Name == "TempestBlade": #Attack = Speed
Player.TempAttack = 0
Player.FreezeMult = 1
Player.Attack = max(0, Player.Speed)
if Name == "SwordOfPride": #If the foe has more attack, armor, or speed, take 3 damage
if Player.Attack < Foe.Attack:
SelfArmorLose(Player, Foe, 3)
if Player.Armor < Foe.Armor:
SelfArmorLose(Player, Foe, 3)
if Player.Speed < Foe.Speed:
SelfArmorLose(Player, Foe, 3)
if Name == "BeeStinger": #Give the foe 4 poison, 3 acid, and 2 stun on hit
StatusInterp("Poison", Foe, Player, 4)
StatusInterp("Acid", Foe, Player, 3)
StatusInterp("Stun", Foe, Player, 2)
if Name == "BlackbriarBow": #Turn Start gain thorns = to your attack
StatusInterp("Thorns", Player, Foe, Player.Attack)
if Name == "BrokenWineglass": #When wounded, on your next turn keep striking until the foe is wounded
if Phase == "Wounded":
Player.BrokenWineglass = True
if Name == "CherryBlade": #Deal 4 damage on batstart and exposed
Amount = 1
if any(p in ("Exposed") for p in Phase):
Amount = Player.ExposedMultiTrigger
for nn in range(0, Amount):
BombDamage(4, Player, Foe)
if Name == "DeathcapBow": #BS: Gain 3 Poison. TS: Gain 1 additional strike, if you are poisoned
if any(p in ("BattleStart") for p in Phase):
StatusInterp("Poison", Player, Foe, 3)
if any(p in ("TurnStart") for p in Phase):
if Player.Poison > 0:
GainStrikes(Player, Foe, 1)
if Name == "HamBat": #Gain 2 additional strikes
GainStrikes(Player, Foe, 2)
if Name == "LemontreeBranch": #{"Weapon", "OnHit", "Food", "Wood"}, #Spend 2 speed to gain an additional strike
if Player.Speed > 1:
GainSpeed(Player, Foe, -2)
GainStrikes(Player, Foe, 1)
if Name == "MelonvineWhip": #On hit remove 1 stack of a random status effect on self
Player.RandomStatus(Foe, -1, True)
if Name == "RocksaltSword": #if your hp is full, gain 1 additional strike
if Player.CurrentHP == Player.MaxHP:
GainStrikes(Player, Foe, 1)
if Name == "SilverscaleSwordfish": #Gain 1 extra strike on battle start, #First Turn on hit give the foe 1 riptide
if any(p in ("BattleStart") for p in Phase):
GainStrikes(Player, Foe, 1)
if any(p in ("FirstTurnStrike") for p in Phase):
StatusInterp("Riptide", Foe, Player, 1)
#Blacksmith Edge
if Name == "AgileEdge": #Gain 1 additional strike on first turn
GainStrikes(Player, Foe, 1)
if Name == "BleedingEdge": #Restore 1 HP
HealingCalc(Player, Foe, 1)
if Name == "BluntEdge": #Gain 1 armor
#Player.Armor = Player.Armor + 1
ArmorGain(Player, Foe, 1)
if Name == "CleansingEdge": #Ignore the first Status effect you are afflicted with
if Player.FirstStatus:
Player.PreventStatusGain = True
Player.FirstStatus = False
if Name == "CuttingEdge": #Deal 1 Damage
DealDamage(1, Player, Foe)
if Name == "FeatherweightEdge": #Convert 1 Speed to 1 Attack
if Player.Speed > 0:
#Player.Speed = Player.Speed - 1
GainSpeed(Player, Foe, -1)
Player.Attack = Player.Attack + 1
if Name == "FreezingEdge": #Give foe 3 freeze
StatusInterp("Freeze", Foe, Player, 3)
#Freeze(3, Player, Foe)
if Name == "GildedEdge": #If Gold < 10, Gain 1 gold
if Player.Gold < 10 and Player.GoldGain:
Player.Gold = Player.Gold + 1
if Name == "JaggedEdge": #Gain 2 thorns and take 1 self damage
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
SelfArmorLose(Player, Foe, 1)
if Name == "OakenEdge": #Gain 3 regen
StatusInterp("Regen", Player, Foe, 3)
#GainRegen(Player, Foe, 3)
if Name == "OozingEdge": #If foe poison = 0, give 2 poison
if Foe.Poison == 0:
StatusInterp("Poison", Foe, Player, 2)
#GainPoison(Foe, Player, 2)
if Name == "PetrifiedEdge": #Double your attack, OH: gain 1 stun
StatusInterp("Stun", Player, Foe, 1)
#Stun(1, Foe, Player)
if Name == "PlatedEdge": #Convert 1 speed to 3 armor
if Player.Speed > 0:
GainSpeed(Player, Foe, -1)
ArmorGain(Player, Foe, 3)
if Name == "RazorEdge": #Gain 1 attack
Player.Attack = Player.Attack + 1
if Name == "SmokingEdge": #Give 1 powder to foe
Foe.Powder = Foe.Powder + 1
if Name == "StormcloudEdge": #Stun foe for 1 turn
StatusInterp("Stun", Foe, Player, 1)
#Stun(1, Player, Foe)
if Name == "WhirlpoolEdge": #Every 3 strikes, give 1 riptide
if Player.StrikeCounter%3 == 0:
StatusInterp("Riptide", Foe, Player, 1)
#GainRiptide(Foe, Player, 1)
if Name == "BloodmoonStrike": ##On your next turn restore hp = to damage done by strikes(I am assuming is would have the right order)
HealingCalc(Player, Foe, Foe.DamageFromFoeStrike)
if Name == "BriarGreaves": #On take damage, gain 1 thorn
StatusInterp("Thorns", Player, Foe, 1)
#GainThorns(Player, Foe, 1)
if Name == "ElderwoodMask": #Double all base attack, armor, speed
#This sound work in most cases
Player.Attack = 2*Player.Attack
ArmorGain(Player, Foe, Player.BaseArmor)
GainSpeed(Player, Foe, Player.Speed)
#Player.Armor = 2*Player.Armor
#Player.Speed = 2*Player.Speed
if Name == "IronbarkShield": #If HP = max HP at BatStart then gain IronbarkShieldTS item
if Player.MaxHP == Player.CurrentHP:
Player.Items = [word.replace("IronbarkShield", "IronbarkShieldTS") for word in Player.Items]
if Name == "IronbarkShieldTS": #1 Armor Gain at turn start
ArmorGain(Player, Foe, 1)
if Name == "IronChain": #Gain 5 armor at battle start
ArmorGain(Player, Foe, 5)
if Name == "LifebloodTransfusion": #Restore 10 HP after battle.
x = 10
if Player.CurrentHP/Player.MaxHP:
x = x*Player.TwilightCrestMult
if Player.Stun > 0:
x = x*Player.VampireCloak
Player.CurrentHP = min(Player.MaxHP, Player.CurrentHP + x*Player.SanguineScepterMult) #I dont think this activates the other effects
if Name == "RawHide": #Gain 1 attack
Player.Attack = Player.Attack + 1
if Name == "RedwoodCrown": #Restore HP to Full
HealingCalc(Player, Foe, Player.MaxHP - Player.CurrentHP)
if Name == "SaffronTalon": #Gain +1 Speed on hit
#Player.Speed = Player.Speed + 1
Player.DeltaSpeed = 1
GainSpeed(Player, Foe, 1)
if Name == "SteelplatedThorns": #Whenever you lose thorns gain that much armor
if Player.Thorns > 0:
#Player.Armor = Player.Armor + Player.Thorns
ArmorGain(Player, Foe, Player.ThornsDecrease)
if Name == "BasilisksGaze": #Your foe is stunned for 2 turns
StatusInterp("Stun", Foe, Player, 2)
#Stun(2, Player, Foe)
#if Name == "CrystalMirror": #Whenever you gain a status effect, give it to the foe too
if Name == "DeadlyToxin": #First time foe gains poison, give 2 acid
if Player.DeadlyToxin:
Player.DeadlyToxin = False
StatusInterp("Acid", Foe, Player, 5)
if Name == "HerosGlasses": #On Hit: Reduce cooldowns by 1, Hero Tome and Hero's Crossguard
Player.Cooldown = Player.Cooldown + 1
if Name == "IronstoneCrest": #Steal 2 armor from foe
if Foe.Armor > 0:
ArmorGain(Player, Foe, min(2, Foe.Armor))
ArmorLose(Foe, Player, min(2, Foe.Armor))
if Name == "IronstoneFang": #Gain 3 armor on hit
ArmorGain(Player, Foe, 3)
if Name == "LiquidMetal": #Give the foe 20 armor, Rusted Sword and Rusted Armor
ArmorGain(Foe, Player, 20)
if Name == "MarbleAnvil": #Exposed trigger at battle start
if Player.ExposedTriggers > 0:
Player.ExposedTriggers = Player.ExposedTriggers - 1
Player.MultiSearch("Exposed", Foe, "FoeExposed")
if Name == "MarshlightAria": #When exposed: Trigger symphony twice
for pp in range(0, 3):
Symphony(Player, Foe, "")
if Name == "SeafoodHotpot": #Gain 2 armor per speed
ArmorGain(Player, Foe, 2*Player.Speed)
if Name == "WeaverMedallion": #5 Base hp
Player.Armor = Player.Armor
# if Player.Armor > 0:
# SelfArmorLose(Player, Foe, 1)
# Player.Attack = Player.Attack + 1
if Name == "IronstoneArrowhead": #Gain 1 armor on hit
ArmorGain(Player, Foe, 1)
if Name == "IronstoneOre": #Gain armor = negative speed
if Player.Speed < 0:
ArmorGain(Player, Foe, -Player.Speed)
if Name == "SanguineGemstone": #If your attack == 1, restore 1 hp on hit? Idk if its sanguine
if Player.Attack == 1:
HealingCalc(Player, Foe, 1)
#Enemy effects
if Name == "Bat": #Heal 1+Lvl HP OnHit every other strike: Lvl is Level - 1
HealingCalc(Player, Foe, Player.Level)
if Name == "Bear": #Gains 3+Lvl attack if foe has armor
if Foe.Armor > 0:
Player.TempAttack = Player.TempAttack + 2 + Player.Level
if Name == "Beaver": #Gain 3+Lvl Regen on BattleStart
StatusInterp("Regen", Player, Foe, 2 + Player.Level)
if Name == "CrazedHoneybear": #Gains 3+Lvl attack if foe has armor?
if Foe.Armor > 0:
Player.TempAttack = Player.TempAttack + 2 + Player.Level
if Name == "Dragonfly": #Gain attack = Speed - player speed >= 0
if Player.Speed - Foe.Speed >= 0:
Player.Attack = Player.Attack + Player.Speed - Foe.Speed
if Name == "Frog":
ArmorGain(Player, Foe, Player.Level) #Gain 1 +Lvl armor on exposed
if Name == "Hedgehog": #Gains 3+Lvl thorns on BattleStart
StatusInterp("Thorns", Player, Foe, 2 + Player.Level)
#GainThorns(Player, Foe, 2 + Player.Level)
if Name == "HoneyBee": #Give the foe 3+Lvl poison, 2+Lvl acid, and 1+Lvl stun on hit
StatusInterp("Poison", Foe, Player, 2 + Player.Level)
StatusInterp("Acid", Foe, Player, 1 + Player.Level)
StatusInterp("Stun", Foe, Player, Player.Level)
if Name == "Raven": # OnHit steals 1+Lvl gold
if Foe.Gold > Player.Level:
Player.Gold = Player.Gold + Player.Level
Foe.Gold = Foe.Gold - Player.Level
else:
Player.Gold = Player.Gold + Foe.Gold
Foe.Gold = 0
if Name == "Slime": # Battle Start: Give the player 4/6/8 acid
StatusInterp("Acid", Foe, Player, 2+2*Player.Level)
if Name == "Snake": #Gives 2 + Lvl poison on first turn hit
StatusInterp("Poison", Foe, Player, 1 + Player.Level)
if Name == "Spider": #If Spider is faster, then it deals 3+Lvl damage BattleStart
if Player.Speed > Foe.Speed:
DealDamage(2+Player.Level, Player, Foe)
if Name == "Turtle": #Lose all armor
if Player.Armor > 0:
SelfArmorLose(Player, Foe, Player.Armor)
if Name == "Wolf": #If Foe.CurrentHP <=5 temp attack is set to +2+Lvl
if Foe.CurrentHP <= 5:
Player.TempAttack = Player.TempAttack + 1 + Player.Level
#Week 1 Bosses
if Name == "BlackKnight": # Gain attack = Foe.Attack + 2 Might be prebattle but p sure its a battlestart speed, might be slower tho
Player.Attack = Player.Attack + Foe.Attack + 2
if Name == "BloodmoonWerewolf": #When player is below 50% HP, gains 5 attack
if Foe.CurrentHP/Foe.MaxHP < 0.5:
Player.TempAttack = Player.TempAttack + 5
if Name == "BrittlebarkBeast": #Whenever you take damage take 3 more
if "SelfArmorLose" in Player.Items:
if Player.Armor >= 1:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 3)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
Player.DeltaArmor = min(3, Player.Armor)
ArmorLose(Player, Foe)
#Player.DeltaArmor = 0
ArmorGain(Player, Foe, Player.DeltaArmor)
Player.DeltaArmor = 0
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
else:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 3)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
Player.Armor = max(0, Player.Armor - 1)
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
else:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - 1)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
if Player.Armor >= 1:
Player.DeltaArmor = 1
ArmorLose(Player, Foe)
Player.DeltaArmor = 0
Player.Armor = max(0, Player.Armor - 1)
Player.Wounded(Foe) #have you been wounded?
Player.Exposed(Foe)
Player.Search("TakeDamageS", Foe) #Adds TakeDamage check
if Name == "IronstoneGolem": #When exposed lose 3 attack
Player.Attack = Player.Attack - 3
#if Name == "RazorclawGrizzly": #Attacks ignore armor
if Name == "RazortuskHog": #If Razortusk Hog has more speed, first strike does 10 extra damage
if Player.Speed > Foe.Speed: #Check might be on battlestart?
Player.TempAttack = Player.TempAttack + 10
if Name == "CarnivorousSlime": #Gives 3 acid and converts all player's hp except 1 into armor
StatusInterp("Acid", Foe, Player, 3)
ArmorGain(Foe, Player, Foe.CurrentHP - 1)
DealDamage(Foe.CurrentHP - 1, Player, Foe) #Deal damage to player to set hp to 1
if Name == "FungalGiant":
x = 0
if Foe.Thorns > 0:
x = x + Player.Thorns
if Foe.Freeze > 0:
x = x + Player.Freeze
if Foe.Regen > 0:
x = x + Player.Regen
if Foe.Poison > 0:
x = x + Player.Poison
if Foe.Stun > 0:
x = x + Player.Stun
if Foe.Riptide > 0:
x = x + Player.Riptide
if Foe.Acid > 0:
x = x + Player.Acid
if Foe.Purity > 0:
x = x + Player.Purity
if x > 0:
StatusInterp("Poison", Player, Foe, x)
if Name == "IronshellSnail":
StatusInterp("Acid", Player, Foe, 5) #Gains 5 acid
if Name == "StormcloudDruid":
if Player.StrikeCounter % 2 == 0:
StatusInterp("Stun", Foe, Player, 1) #Stun the player for 1 turn every other strike
if Name == "SwampsongSiren": #Gives the Player -2 attack
Foe.Attack = Foe.Attack - 2
if Name == "ToxicMiretoad":
x = Foe.Armor
ArmorGain(Foe, Player, -x)
ArmorGain(Player, Foe, x)
StatusInterp("Poison", Foe, Player, 3)
#if Name == "MountainTroll": #Only strikes every other turn
if Name == "RedwoodTreant": #Temp gains 3 attack if player has no armor
if Foe.Armor <= 0:
Player.TempAttack = Player.TempAttack + 3
if Name == "BlackbriarKing": #CANNOT ATTACK, instead gains 2 thorns every turn. 4 if wounded(Below 50% hp)
if Player.CurrentHP/Player.MaxHP > 0.5:
StatusInterp("Thorns", Player, Foe, 2)
#GainThorns(Player, Foe, 2)
else:
StatusInterp("Thorns", Player, Foe, 4)
#GainThorns(Player, Foe, 4)
if Name == "GoldwingMonarch": #Steals all the players gold and heals for 2*Gold
if Foe.Gold > 0:
HealingCalc(Player, Foe, 2*Foe.Gold)
Foe.Gold = 0
if Name == "FrostbiteDruid": #Gives the player 1 freeze
StatusInterp("Freeze", Player, Foe, 1)
if Name == "SwiftstrikeStag": #Strikes 3 times
Player.BaseStrikesCount = 3
#Swamp Week 2
if Name == "ClearspringSpirit": #BS: Gains 10 Purity. On Hit randomly decrease a self or player status
if any(p in ("BattleStart") for p in Phase):
StatusInterp("Purity", Player, Foe, 10)
elif any(p in ("OnHit") for p in Phase): #This is missing the removing self status effect
Player.RandomStatus(Foe, -1, True)
if Name == "GraniteGriffin": #Gain 40 Armor and Stun for 4 turns
ArmorGain(Player, Foe, 40)
StatusInterp("Stun", Player, Foe, 4)
if Name == "LiferootExperiment": #Gain 10 Regen
StatusInterp("Regen", Player, Foe, 10)
if Name == "RockshellTortoise": #Whenever it is struck, gains 4 armor
ArmorGain(Player, Foe, 4)
if Name == "SilverscaleShark": #TS: Gives the player 2 riptide. Gains 1 temp attack per player riptide
StatusInterp("Riptide", Foe, Player, 2)
Player.TempAttack = Player.TempAttack + Foe.Riptide
if Name == "StonescaleBasilisk": #Gives 2 poison on hit
StatusInterp("Poison", Foe, Player, 2)
#if Name == "Leshen": #Currently does nothing
if Name == "WoodlandAbomination": #Gain an attack
Player.Attack = Player.Attack + 1
if Name == "AcidHead": #On Hit: Gives 1 acid
StatusInterp("Acid", Foe, Player, 1)
if Name == "RiptideHead": #On Hit: Gives 1 riptide
StatusInterp("Riptide", Foe, Player, 1)
if Name == "PoisonHead": #On Hit: Gives 2 poison
StatusInterp("Poison", Foe, Player, 2)
if Name == "StunHead": #Battle Start: Gives 3 stun
if Player.StunHead:
StatusInterp("Stun", Foe, Player, 3)
Player.StunHead = False
if Name == "IronshellBeetle": #Lose 1 attack on hit (Up to 0)
if Player.Attack > 0:
Player.Attack = Player.Attack - 1
if Name == "LifebloodCount": #Restores 3 hp on hit
HealingCalc(Player, Foe, 3)
if Name == "SilkweaverQueen": #Turn Start steals 1 speed. If the foe has 0 or less speed, deal 3 damage instead
if Foe.Speed > 0:
Foe.Speed = Foe.Speed - 1
elif 0 >= Foe.Speed:
DealDamage(3, Player, Foe)
if Name == "CovenPlaguemother": #Gives the player 2 stacks of a random status they dont have
Foe.RandomStatus(Player, 2, False)
if Name == "MurkwaterGator": #BattleStart gives the player riptide = to player's attack
if Foe.Attack > 0:
StatusInterp("Riptide", Foe, Player, Foe.Attack)
if Name == "PalaceSentinel": #Turn Start if it is slower, self stun and gain 2 speed
if Player.Speed < Foe.Speed:
StatusInterp("Stun", Player, Foe, 1)
GainSpeed(Player, Foe, 2)
return [Player, Foe]
def ItemsBaseStats(Quality, Name):
# Base stats [Max Hp, Attack, Armor, Speed]
BaseStats = [0, 0, 0, 0]
QF = 2**(int(Quality))
if Name == "BoomStick": #2 attack
BaseStats[1] = 2
if Name == "BootsOfTheHero":#2*Quality Speed
BaseStats[3] = 2*QF
if Name == "BrittlebarkBow": #4 Attack
BaseStats[1] = 4
if Name == "ChampionsArmor":#6*Quality Armor
BaseStats[2] = 6*QF
if Name == "ChampionsBlade":# 6 attack
BaseStats[1] = 6
if Name == "DoubleplatedArmor": #2*Quality Armor and -2*Quality Speed
BaseStats = [0, 0, 2*QF, -2*QF]
if Name == "ElderwoodStaff": #1 atk, armor, speed
BaseStats = [0, 1, 1, 1]
if Name == "EmeraldCrown": #8 MaxHP and -1 attack * Quality
BaseStats = [8*QF, -1*QF, 0, 0]
if Name == "FeatherweightBlade": #2 Attack 2 Speed
BaseStats = [0, 2, 0, 2]
if Name == "ForgeHammer": #4 Attack
BaseStats[1] = 4
if Name == "FungalRapier": #3 Attack
BaseStats[1] = 3
if Name == "GaleStaff": #2 attack and 6 speed
BaseStats = [0, 2, 0, 6]
if Name == "GrillingSkewer": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "Haymaker": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "HeartDrinker": #1 Attack
BaseStats = [0, 1, 0, 0]
# if Name == "HiddenDagger": #It gives more attack the more HD you have, aka just stats
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "HolyShield": # -1 Attack, 6 armor and -1 speed *QF
BaseStats = [0, -1*QF, 6*QF, -1*QF]
if Name == "HolyTome": # -1 Attack*QF
BaseStats = [0, -1*QF, 0, 0]
if Name == "HornedHelmet": #2 Armor *Q
BaseStats = [0, 0, 2*QF, 0]
if Name == "IceblockShield": #8 Armor
BaseStats = [0, 0, 8, 0]
if Name == "IronstoneBracelet": #-1 speed
BaseStats = [0, 0, 0, -1]
if Name == "IronstoneGreatsword": #4 Atk -2 Spd
BaseStats = [0, 4, 0, -2]
if Name == "IronstoneSpear": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "KnightsArmor": #4 Armor *Q
BaseStats = [0, 0, 4*QF, 0]
if Name == "KnightsBlade": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "LeatherBelt": #3 MaxHP *Q but 2x if no base armor
BaseStats = [3*QF, 0, 0, 0]
if Name == "LeatherGlove": #3 MaxHP and 1 Speed *Q
BaseStats = [3*QF, 0, 0, 1*QF]
if Name == "LeatherVest": #2 Armor and 1 Speed *Q
BaseStats = [0, 0, 2*QF, 1*QF]
if Name == "LiferootGauntlet": #3 MaxHP *Q
BaseStats = [3*QF, 0, 0, 0]
if Name == "LiferootStaff": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "LightspeedPotion": #1 Speed
BaseStats = [0, 0, 0, 1]
if Name == "LightspeedElixir": #1 Speed
BaseStats = [0, 0, 0, 1]
if Name == "MarbleSword": #1 Atk and 2 Armor
BaseStats = [0, 1, 2, 0]
if Name == "PacifistStaff": #0 base stats
BaseStats = [0, 0, 0, 0]
if Name == "PurelakeHelmet": #2 Armor *Q
BaseStats = [0, 0, 2*QF, 0]
if Name == "RazorthornSpear": #Gain 2 thorns on hit
BaseStats = [0, 1, 0, 0]
if Name == "RedwoodCloak": #2 MaxHp *Q
BaseStats = [2*QF, 0, 0, 0]
if Name == "RedwoodHelmet": #1 MaxHp and 1 Armor *Q
BaseStats = [1*QF, 0, 1*QF, 0]
if Name == "RedwoodRoast": #5 MaxHp *Q
BaseStats = [5*QF, 0, 0, 0]
if Name == "RedwoodRod": #4 MaxHp and 2 Attack
BaseStats = [4, 2, 0, 0]
if Name == "RubyCrown": #1 Attack and -1 Speed *Q
BaseStats = [0, 1*QF, 0, -1*QF]
if Name == "SaffronFeather": #1 Speed *Q
BaseStats = [0, 0, 0, 1*QF]
if Name == "SapphireCrown": #-2 MaxHP and 5 Armor * Q
BaseStats = [-2*QF, 0, 5*QF, 0]
if Name == "ShieldOfTheHero": # 3 Armor *Q
BaseStats = [0, 0, 3*QF, 0]
if Name == "SilverscaleDagger": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SlimeArmor": #5 Armor *Q
BaseStats = [0, 0, 5*QF, 0]
if Name == "SlimeSword": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SourLemon": #3 Speed *Q
BaseStats = [0, 0, 0, 3*QF]
if Name == "SpearshieldLance": #1 Attack and 6 armor
BaseStats = [0, 1, 6, 0]
if Name == "SquiresArmor": #2 Armor
BaseStats = [0, 0, 2, 0]
if Name == "SquiresBlade": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "StormcloudSpear": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SwordOfTheHero": #3 Attack
BaseStats = [0, 3, 0, 0]
# if Name == "WoodcuttersAxe": #1 Attack + 2*Empty Slots
# #Stats Only Weapon does nothing
# Player.Attack = Player.Attack
if Name == "WoodenStick": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "ArcaneWand": #0 Attack
BaseStats = [0, 0, 0, 0]
if Name == "BasiliskFang": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "BattleAxe": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "BejeweledBlade": # 1+ Gains 2 attack per jewelry item in inv
BaseStats = [0, 1, 0, 0]
if Name == "BlackbriarBlade": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "BlastcapArmor": #8 Armor
BaseStats = [0, 0, 8, 0]
if Name == "BloodmoonDagger": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "BloodmoonSickle": #5 Attack
BaseStats = [0, 5, 0, 0]
if Name == "BrambleBuckler": #2 Armor
BaseStats = [0, 0, 2, 0]
if Name == "BrambleVest": #3 MaxHP
BaseStats = [3, 0, 0, 0]
if Name == "BrittlebarkBuckler": #10 Armor
BaseStats = [0, 0, 10, 0]
if Name == "BubblegloopStaff": #0 Attack
BaseStats = [0, 0, 0, 0]
if Name == "ChainmailCloak": #2 Armor
BaseStats = [0, 0, 2, 0]
if Name == "ClearspringOpal": #2 Speed
BaseStats = [0, 0, 0, 2]
if Name == "ExplosiveSword": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "ForgeGauntlet": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "FriendshipBracelet": #-1 Attack
BaseStats = [0, -1, 0, 0]
if Name == "FrostbiteArmor": #2 Armor
BaseStats = [0, 0, 2, 0]
if Name == "FrostbiteDagger": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "GraniteAxe": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "IcicleSpear": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "ImpressivePhysique": #2 Speed
BaseStats = [0, 0, 0, 2]
if Name == "IronstoneBow": #6 Attack and 1 Speed
BaseStats = [0, 6, 0, 1]
if Name == "IronstoneSandals": #-1 Speed
BaseStats = [0, 0, 0, -1]
if Name == "LifebloodSpear": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "LiferootHammer": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "LightningBottle": #1 Attack and 2 Speed
BaseStats = [0, 1, 0, 2]
if Name == "LightningElixir": #3 Attack and 4 Speed
BaseStats = [0, 3, 0, 4]
if Name == "LightningRod": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "LightningWhip": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "MushroomBuckler": #3 Armor
BaseStats = [0, 0, 3, 0]
if Name == "OakHeart": #3 MaxHP per wood item
BaseStats = [3, 0, 0, 0]
if Name == "PlatedShield": #-1 Speed
BaseStats = [0, 0, 0, -1]
if Name == "PoisonousMushroom": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "RingBlades": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "RoyalHelmet": #1 Armor
BaseStats = [0, 0, 1, 0]
if Name == "RustySword": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SaltcrustedCrown": #8 MaxHP
BaseStats = [8, 0, 0, 0]
if Name == "SanguineScepter": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "SilverAnchor": #-1 Speed
BaseStats = [0, 0, 0, -1]
if Name == "SilverscaleGreaves": #2 Speed
BaseStats = [0, 0, 0, 2]
if Name == "StormcloudArmor": #3 Armor
BaseStats = [0, 0, 3, 0]
if Name == "SwiftstrikeBow": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SwiftstrikeRapier": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "WaveBreaker": #-2 Attack
BaseStats = [0, -2, 0, 0]
if Name == "AcidicWitherleaf": #1 Speed
BaseStats = [0, 0, 0, 1]
if Name == "BlackbriarArmor": #-1 Attack
BaseStats = [0, -1, 0, 0]
if Name == "BloodlordsAxe": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "BrittlebarkArmor": #12 maxHP
BaseStats = [12, 0, 0, 0]
if Name == "BrittlebarkClub": #7 Attack
BaseStats = [0, 7, 0, 0]
if Name == "ChainmailSword": #2 Attack and 2 Armor
BaseStats = [0, 2, 2, 0]
if Name == "ElderwoodNecklace": #1 Attack, armor and speed
BaseStats = [0, 1, 1, 1]
if Name == "FrozenIceblade": #6 Attack
BaseStats = [0, 6, 0, 0]
if Name == "GemstoneScepter": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "GraniteHammer": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "GraniteLance": #2 attack and 1 Armor and Stat effect 2x base armor
BaseStats = [0, 2, 1, 0]
if Name == "GrindstoneClub": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "IronstoneArmor": #-2 speed
BaseStats = [0, 0, 0, -2]
if Name == "KingsBlade": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "LeatherWhip": #5 max hp and 4 attack
BaseStats = [5, 4, 0, 0]
if Name == "LifestealScythe": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "MeltingIceblade": #8 Attack
BaseStats = [0, 8, 0, 0]
if Name == "MistArmor": #10 MaxHP and 2 Speed
BaseStats = [10, 0, 0, 2]
if Name == "MoonlightCleaver": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "NoxiousGas": #6 Armor
BaseStats = [0, 0, 6, 0]
if Name == "PetrifiedStatue": #-2 Speed
BaseStats = [0, 0, 0, -2]
if Name == "PurelakeStaff": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "QuickgrowthSpear": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "RazorBreastplate": #3 Armor
BaseStats = [0, 0, 3, 0]
if Name == "RiverflowRapier": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "RoyalCrownblade": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "RoyalScepter": #0 Attack Sets attack always equal to gold. Cannot have more than 10 gold
BaseStats = [0, 0, 0, 0]
if Name == "SerpentDagger": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SilverscaleTrident": #0 Attack
BaseStats = [0, 0, 0, 0]
if Name == "StoneslabSword": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SwiftstrikeCloak": #1 Speed
BaseStats = [0, 0, 0, 1]
if Name == "ThunderboundSabre": #6 Attack
BaseStats = [0, 6, 0, 0]
if Name == "ThunderCloud": #-1 Attack
BaseStats = [0, -1, 0, 0]
if Name == "TwinBlade": #1 Attack
BaseStats = [0, 1, 0, 0]
if Name == "WeaverArmor": #-2 Attack
BaseStats = [0, -2, 0, 0]
if Name == "AncientWarhammer": #5 Attack
BaseStats = [0, 5, 0, 0]
if Name == "BearclawBlade": #5 MaxHP and 0 Attack, Attack = Missing HP
BaseStats = [5, 0, 0, 0]
if Name == "BloodmoonArmor": #6 Armor
BaseStats = [0, 0, 6, 0]
if Name == "DashmastersDagger": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "LakebedSword": #5 Attack
BaseStats = [0, 5, 0, 0]
if Name == "MountainCleaver": #0 Attack and 2 Armor, Attack = Base Armor
BaseStats = [0, 0, 2, 0]
if Name == "SerpentScalemail": #4 Armor
BaseStats = [0, 0, 4, 0]
if Name == "TempestBlade": #0 Attack and 2 Speed, Attack = Speed
BaseStats = [0, 0, 0, 2]
if Name == "CleaverOfWrath": #MaxHP is set to 1 and 10 Attack
BaseStats = [0, 10, 0, 0]
if Name == "ScepterOfGreed": #6 Attack
BaseStats = [0, 6, 0, 0]
if Name == "SwordOfPride": #3 attack, armor, and speed
BaseStats = [0, 3, 3, 3]
if Name == "BeltOfGluttony": #15 MaxHP
BaseStats = [15, 0, 0, 0]
if Name == "BootsOfSloth": #10 Speed
BaseStats = [0, 0, 0, 10]
if Name == "ChestOfLust": #8 Armor
BaseStats = [0, 0, 8, 0]
if Name == "HelmetOfEnvy": # 3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "BeeStinger": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "BitterMelon": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "BlackbriarBow": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "BloodOrange": #4 Speed
BaseStats = [0, 0, 0, 4]
if Name == "BloodSausage": #5 MaxHP
BaseStats = [5, 0, 0, 0]
if Name == "BoiledHam": #5 MaxHP
BaseStats = [5, 0, 0, 0]
if Name == "BrokenWinebottle": # 2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "CherryBlade": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "CombustibleLemon": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "DeathcapBow": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "ExplosiveRoast": #5 MaxHP
BaseStats = [5, 0, 0, 0]
if Name == "HamBat": #5 MaxHP and 3 Attack
BaseStats = [5, 3, 0, 0]
#if Name == "HoneyHam": #Doubles MaxHP
#BaseStats = [0, 0, 0, 0]
if Name == "HoneyglazedShroom": #4 Attack
BaseStats = [0, 4, 0, 0]
if Name == "LemonRoast": #5 MaxHP and 5 Speed
BaseStats = [5, 0, 0, 5]
if Name == "LemonShark": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "LemonSyrup": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "LemontreeBranch": #2 Attack and 4 Speed
BaseStats = [0, 2, 0, 4]
if Name == "LimestoneFruit": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "MarbleMushroom": #4 Attack and 6 Armor
BaseStats = [0, 4, 6, 0]
if Name == "MelonLemonade": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "MelonvineWhip": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "MoldyMeat": #-5 MaxHP and 5 Attack
BaseStats = [-5, 5, 0, 0]
if Name == "MushroomSoup": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "PoisonousDurian": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "PoisonousLemon": #3 Attack and 4 Speed
BaseStats = [0, 3, 0, 4]
if Name == "PoisonousPufferfish": #3 Attack
BaseStats = [0, 3, 0, 0]
if Name == "RoastedChestnut": #5 MaxHP
BaseStats = [5, 0, 0, 0]
if Name == "RockRoast": #6 MaxHP and 6 Armor
BaseStats = [6, 0, 6, 0]
if Name == "RocksaltSword": #2 Attack and 6 Armor
BaseStats = [0, 2, 6, 0]
if Name == "SharkRoast": #5 MaxHP
BaseStats = [5, 0, 0, 0]
if Name == "SilverscaleSwordfish": #2 Attack
BaseStats = [0, 2, 0, 0]
if Name == "SpinyKiwifruit": #3 Speed
BaseStats = [0, 0, 0, 3]
if Name == "ToxicCherry": #3 Attack
BaseStats = [0, 3, 0, 0]
return BaseStats
def ConditionalMult(Value, Condition):
if Condition and Value < 0:
Value = 0
return Value
def LeftStatCheck(event):
LeftMaxHP = 10
LeftAttack = 0
LeftArmor = 0
LeftSpeed = 0
Quality = 0
HolyCrux = False
if CountBaseStatItems("Left", "HolyShield") > 0 and CountBaseStatItems("Left", "HolyTome") > 0:
HolyCrux = True
count = int(document.getElementById("WeekCount").value)
Weapon = document.getElementById("LeftWeapons").value
StatsChange = ItemsBaseStats(Quality, Weapon)
LeftMaxHP = LeftMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
LeftAttack = LeftAttack + ConditionalMult(StatsChange[1], HolyCrux)
LeftArmor = LeftArmor + ConditionalMult(StatsChange[2], HolyCrux)
LeftSpeed = LeftSpeed + ConditionalMult(StatsChange[3], HolyCrux)
Edge = document.getElementById("LeftEdges").value
StatsChange = ItemsBaseStats(Quality, Edge)
LeftMaxHP = LeftMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
LeftAttack = LeftAttack + ConditionalMult(StatsChange[1], HolyCrux)
LeftArmor = LeftArmor + ConditionalMult(StatsChange[2], HolyCrux)
LeftSpeed = LeftSpeed + ConditionalMult(StatsChange[3], HolyCrux)
for i in range(0, count):
Item = document.getElementById(f"itemslots_{i}").value
Quality = document.getElementById(f"quality_{i}").value
StatsChange = ItemsBaseStats(Quality, Item)
LeftMaxHP = LeftMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
LeftAttack = LeftAttack + ConditionalMult(StatsChange[1], HolyCrux)
LeftArmor = LeftArmor + ConditionalMult(StatsChange[2], HolyCrux)
LeftSpeed = LeftSpeed + ConditionalMult(StatsChange[3], HolyCrux)
if document.getElementById("LeftAttackOil").checked:
LeftAttack = LeftAttack + 1
if document.getElementById("LeftArmorOil").checked:
LeftArmor = LeftArmor + 1
if document.getElementById("LeftSpeedOil").checked:
LeftSpeed = LeftSpeed + 1
if Weapon == "SwordOfTheHero" and CountBaseStatItems("Left", "ShieldOfTheHero") > 0 and CountBaseStatItems("Left", "BootsOfTheHero") > 0:
LeftAttack = LeftAttack + 2
LeftArmor = LeftArmor + 2
LeftSpeed = LeftSpeed + 2
if Weapon == "ChampionsBlade" and CountBaseStatItems("Left", "ChampionsArmor") > 0:
LeftSpeed = LeftSpeed + 6
if CountBaseStatItems("Left", "WeaverArmor") > 0 and CountBaseStatItems("Left", "WeaverShield") > 0:
LeftMaxHP = LeftMaxHP + 5
if Weapon == "ChainmailSword" and CountBaseStatItems("Left", "ChainmailArmor") > 0:
LeftArmor = LeftArmor + 5
if LeftArmor == 0:
LeftMaxHP = LeftMaxHP + 3*CountBaseStatItems("Left", "LeatherBelt")
if CountBaseStatItems("Left", "HoneyHam") > 0:
LeftMaxHP = 2*LeftMaxHP
if Weapon == "GraniteLance":
LeftArmor = 2*LeftArmor
if Weapon == "CleaverOfWrath":
LeftMaxHP = 1
document.getElementById("LeftMaxHP").value = LeftMaxHP
document.getElementById("LeftAttack").value = LeftAttack
document.getElementById("LeftArmor").value = LeftArmor
document.getElementById("LeftSpeed").value = LeftSpeed
def RightStatCheck(event):
RightMaxHP = 10
RightAttack = 0
RightArmor = 0
RightSpeed = 0
Quality = 0
HolyCrux = False
if CountBaseStatItems("Right", "HolyShield") > 0 and CountBaseStatItems("Right", "HolyTome") > 0:
HolyCrux = True
count = int(document.getElementById("WeekCount").value)
Weapon = document.getElementById("WeaponsRight").value
StatsChange = ItemsBaseStats(Quality, Weapon)
RightMaxHP = RightMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
RightAttack = RightAttack + ConditionalMult(StatsChange[1], HolyCrux)
RightArmor = RightArmor + ConditionalMult(StatsChange[2], HolyCrux)
RightSpeed = RightSpeed + ConditionalMult(StatsChange[3], HolyCrux)
Edge = document.getElementById("RightEdges").value
StatsChange = ItemsBaseStats(Quality, Edge)
RightMaxHP = RightMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
RightAttack = RightAttack + ConditionalMult(StatsChange[1], HolyCrux)
RightArmor = RightArmor + ConditionalMult(StatsChange[2], HolyCrux)
RightSpeed = RightSpeed + ConditionalMult(StatsChange[3], HolyCrux)
for i in range(0, count):
Item = document.getElementById(f"itemslotRight_{i}").value
Quality = document.getElementById(f"qualityRight_{i}").value
StatsChange = ItemsBaseStats(Quality, Item)
RightMaxHP = RightMaxHP + ConditionalMult(StatsChange[0], HolyCrux)
RightAttack = RightAttack + ConditionalMult(StatsChange[1], HolyCrux)
RightArmor = RightArmor + ConditionalMult(StatsChange[2], HolyCrux)
RightSpeed = RightSpeed + ConditionalMult(StatsChange[3], HolyCrux)
if document.getElementById("RightAttackOil").checked:
RightAttack = RightAttack + 1
if document.getElementById("RightArmorOil").checked:
RightArmor = RightArmor + 1
if document.getElementById("RightSpeedOil").checked:
RightSpeed = RightSpeed + 1
if Weapon == "SwordOfTheHero" and CountBaseStatItems("Right", "ShieldOfTheHero") > 0 and CountBaseStatItems("Right", "BootsOfTheHero") > 0:
RightAttack = RightAttack + 2
RightArmor = RightArmor + 2
RightSpeed = RightSpeed + 2
if Weapon == "ChampionsBlade" and CountBaseStatItems("Right", "ChampionsArmor") > 0:
RightSpeed = RightSpeed + 6
if CountBaseStatItems("Right", "WeaverArmor") > 0 and CountBaseStatItems("Right", "WeaverShield") > 0:
RightMaxHP = RightMaxHP + 5
if Weapon == "ChainmailSword" and CountBaseStatItems("Right", "ChainmailArmor") > 0:
RightArmor = RightArmor + 5
if RightArmor == 0:
RightMaxHP = RightMaxHP + 3*CountBaseStatItems("Right", "LeatherBelt")
if CountBaseStatItems("Right", "HoneyHam") > 0:
RightMaxHP = 2*RightMaxHP
if Weapon == "GraniteLance":
RightArmor = 2*RightArmor
if Weapon == "CleaverOfWrath":
RightMaxHP = 1
document.getElementById("RightMaxHP").value = RightMaxHP
document.getElementById("RightAttack").value = RightAttack
document.getElementById("RightArmor").value = RightArmor
document.getElementById("RightSpeed").value = RightSpeed
def CountBaseStatItems(Side, CheckingForItem):
if Side == "Right":
S = "Right"
Q = "Right"
elif Side == "Left":
S = "s"
Q = ""
Count = 0
count = int(document.getElementById("WeekCount").value)
for i in range(0, count):
Item = document.getElementById(f"itemslot{S}_{i}").value
Quality = document.getElementById(f"quality{Q}_{i}").value
if CheckingForItem == Item:
Count = Count + 2**int(Quality)
return Count
def Healable(Player):
x = False
if Player.MaxHP - Player.CurrentHP > 0:
x = True
return x
def HPRestored(Player, Foe):
Player.Search("HPRestore", Foe)
def HPOverHeal(Player, Foe):
Player.Search("HPOverHeal", Foe)
def Sanguine(Player, Foe, Value):
HealingCalc(Player, Foe, Player.SanguineMult*Value)
def HealingCalc(Player, Foe, Value):
if not Player.HealingDisabled:
if Player.CurrentHP/Player.MaxHP < 0.5:
Value = Player.TwilightCrestMult*Value
if Player.Stun > 0:
Value = Value*Player.VampireCloak
Value = Value*Player.SanguineScepterMult
x = Player.CurrentHP - Player.MaxHP + Value
if Healable(Player):
z = min(Player.MaxHP, Player.CurrentHP + Value) - Player.CurrentHP
Player.CurrentHP = min(Player.MaxHP, Player.CurrentHP + Value)
if Player.FirstHealToggle == True:
FirstHPRestore(Player, Foe, min(Value, Value - x))
if z >= 3:
Player.Search("HP3Restore", Foe)
HPRestored(Player, Foe)
if "HPOverHeal" in Player.Items and x > 0:
DealDamage(x, Player, Foe)
def ArmorGain(Player, Foe, NewArmor):
if NewArmor > 0:
Player.GainedArmor = True
if Player.PlatedShield:
NewArmor = 2*NewArmor
Player.PlatedShield = False
Player.Armor = Player.Armor + NewArmor
Player.Search("ArmorGain", Foe)
def GainStrikes(Player, Foe, Value):
mult = 1
if "SwiftstrikeBow" in Player.Items: #Can generalize if more gain strikes are added
mult = 2
Player.StrikesCount = Player.StrikesCount + mult*Value
def TakeDamage(Player, Foe):
Player.Wounded(Foe) #Might need to run all three at the same time
Player.Exposed(Foe)
Player.Search("TakeDamage", Foe)
if Player.SecondTakeDamage:
Player.Search("SecondTakeDamage", Foe)
Player.SecondTakeDamage = False
if Player.TakeDamageCount % 3 == 0 and Player.TakeDamageCount > 0:
Player.Search("ThirdTakeDamage", Foe)
Player.TakeDamageCount = Player.TakeDamageCount + 1
def OnHit(Player, Foe):
#document.getElementById("debugBox").innerText = str(Player.FirstTurn) + str(Foe.FirstTurn)
for ii in range(0, Player.OnHitTriggerFT + Player.OnHitTrigger):
if Player.FirstTurn:
Player.Search(["OnHit", "FirstTurnOnHit"], Foe)
else:
Player.Search("OnHit", Foe)
def GainSpeed(Player, Foe, SpeedChange):
if SpeedChange > 0:
Player.Speed = Player.Speed + SpeedChange
Player.Search("GainSpeed", Foe)
Player.DeltaSpeed = 0
else:
Player.Speed = Player.Speed + SpeedChange
Player.Search("LoseSpeed", Foe)
Player.DeltaSpeed = 0
def GainThorns(Player, Foe, Value):
if Value > 0:
if "SpikyClub" in Player.Items or "BlackbriarBlade" in Player.Items:
Player.Attack = Player.Attack + Value
else:
Player.Thorns = Player.Thorns + Value
Player.Search("GainThorns", Foe)
elif Value < 0:
ThornsLose(Player, Foe, Value)
def ThornsLose(Player, Foe, Value):
Player.Thorns = Player.Thorns + Value
Player.ThornsDecrease = -Value
Player.Search("ThornsLose", Foe)
Player.ThornsDecrease = 0
Player.FirstThornLose = False
def ArmorLose(Player, Foe): #This needs the Deltaarmor value for razorscales and sapphire gemstone
Player.Search("ArmorLose", Foe)
Player.DeltaArmor = 0 #I think thats the right spot
def Nonweapon(Player, Foe):
Player.SecondNonWeapon = Player.SecondNonWeapon + 1
Player.Search("Nonweapon", Foe)
Player.Search("SecondNonweapon", Foe)
def Count(Player, Tag):
c = Player.Count(Tag)
return c
def Symphony(Player, Foe, Instrument):
#I think I can use the new "Phase" system to make it so I only need 1 instrument item and include the "Symphony" Phase tag to not trigger another symphony unless you have the one item.
#Triggers a random instrument(Not the one that was triggered)
ListInstruments = []
RemovedOnce = False
for slot in range(0, len(Player.Items)): #max(len(P.Items), len(Foe.Items))):
if "Instrument" in ItemTags[Player.Items[slot]]:
ListInstruments.append(slot)
for slot in range(0, len(Player.Items)): #max(len(P.Items), len(Foe.Items))):
if not RemovedOnce and Instrument == Player.Items[slot]:
RemovedOnce = True
if slot in ListInstruments:
ListInstruments.remove(slot)
if "GrandCrescendo" in Player.Items:
for ii in range(0, len(ListInstruments)):
slot = int(ListInstruments[ii])
Choice = Player.Items[slot] + "S"
[Player, Foe] = ItemsEffect("Symphony", Player.Quality[slot], Choice, Player, Foe)
if not "GrandCrescendo" in Player.Items:
#This *probably* works Idk
if ListInstruments != [] and Player.Alive and Foe.Alive:
RanNumber = random.randint(0, len(ListInstruments) - 1)
slot = int(ListInstruments[RanNumber])
Choice = Player.Items[slot] + "S"
[Player, Foe] = ItemsEffect("Symphony", Player.Quality[slot], Choice, Player, Foe)
def TurnCount(Player, Foe, TurnNum):
Player.SecondNonWeapon = 0
Player.TurnCounter = Player.TurnCounter + 1
#Fatigue?
if TurnNum > 25:
DealDamage(TurnNum-25, Foe, Player)
#I think CD go first before turnstart? *Might* be end of turn
Player.Cooldown = Player.Cooldown + 1
Player.Search("Cooldown", Foe)
if TurnNum == 0:
Foe.Search("TurnStartFoe", Player)
Player.Search(["TurnStart", "EveryOtherTurn", "FirstTurn"], Foe)
elif TurnNum % 2 == 0:
Foe.Search("TurnStartFoe", Player)
Player.Search(["TurnStart", "EveryOtherTurn"], Foe)
else:
Foe.Search("TurnStartFoe", Player)
Player.Search(["TurnStart", "OddEveryOtherTurn"], Foe)
if "PrimordialSoup" in Player.Items: #This does break Rusted Plate
if Player.Acid > 0:
Player.DeltaArmor = min(Player.Armor, Player.Acid)
DealDamage(Player.Acid, Foe, Player)
Foe.Search("AcidDamage", Player)
else:
if Player.Armor > 0 and Player.Acid > 0:
Player.DeltaArmor = min(Player.Armor, Player.Acid)
DealDamage(Player.DeltaArmor, Foe, Player)
Foe.Search("AcidDamage", Player)
if Player.Armor == 0 and Player.Poison > 0:
DealDamage(Player.Poison, Foe, Player)
StatusInterp("Poison", Player, Foe, -1)
#GainPoison(Player, Foe, -1)
def FirstHPRestore(Player, Foe, Value):
Player.FirstHealToggle = False
for slot in range(0, len(Player.Items)): #max(len(P.Items), len(Foe.Items))):
if "FirstHPRestore" in ItemTags[Player.Items[slot]]:
Player.Attack = Player.Attack + Value
#Currently Only Ironstonesandals use this attribute could maybe make the crackedwhetstone use it too #old info
def PreStrikeAttackBonus(Player, Foe):
Player.Search("PreStrike", Foe)
Foe.Search("PreFoeStrike", Player)
def PreStrikeL(Player, Foe):
if Count(Player, "PreStrikeL") > 0:
Player.TempAttack = 0
Player.Search("PreStrikeL", Foe)
def AfterFoeFirstStrike(Player, Foe):
Player.Search("AfterFoeFirstStrike", Foe)
#Checks if you have item that acts on selfarmor lose. And calcs the damage you take
#Hmmmmmmmmmmmmmmmmmmmmmmmmmm I think the sword talisman shouldnt be in the deal damage function?
def SelfArmorLose(Player, Foe, DamageValue):
if "BloodmoonArmor" in Player.Items: #Can be more generalized
DealDamage(DamageValue, Player, Foe)
elif any("SelfArmorLose" in ItemTags[item] for item in Player.Items): #"SelfArmorLose" in ItemTags[Player.Items]:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - DamageValue)
Player.AliveCheck(Foe)
Death(Player)
HP1Check(Player, Foe)
if Player.Armor > 0:
Player.DeltaArmor = min(Player.Armor, DamageValue)
ArmorLose(Player, Foe)
ArmorGain(Player, Foe, Player.DeltaArmor)
Player.DeltaArmor = 0
elif Player.Armor <= 0:
Player.Exposed(Foe)
TakeDamage(Player, Foe)
#Idk why below was here removing it might break smth
else:
#DealDamage(DamageValue, Foe, Player)
if DamageValue > 0:
Player.CurrentHP = min(Player.CurrentHP, Player.CurrentHP + Player.Armor - DamageValue) #Updates hp of foe if foe's armor reached 0
HP1Check(Foe, Player)
if Player.Armor > 0:
Player.DeltaArmor = max(min(Player.Armor, DamageValue), 0)
ArmorLose(Player, Foe)
Player.DeltaArmor = 0
Player.Armor = max(0, Player.Armor - DamageValue)
elif Player.Armor <= 0:
Player.Exposed(Foe)
TakeDamage(Player, Foe)
def StrikeMult(Player, Foe):
Player.Search("StrikeMult", Foe)
def HP1Check(Player, Foe):
if Player.CurrentHP < 5:
Player.Search("HP5", Foe)
if Player.CurrentHP == 1:
Player.Search("HP1", Foe)
def EndBattleHeal(Player, Foe):
Player.Search("BattleEnd", Foe)
def BombDamage(Damage, Player, Foe):
#Add check to see if you do more damage/Retrigger
for nn in range(0, Player.BombTrigger):
DealDamage(Player.BombMult*(Damage + Player.BombBonus + Player.TempBombBonus), Player, Foe)
if Player.BombMult*(Damage + Player.BombBonus + Player.TempBombBonus) >= 5:
Player.Search("BombDamage5", Foe)
Player.TempBombBonus = 0
def SelfBombDamage(Damage, Player, Foe):
#Add check to see if you do more damage/Retrigger
for nn in range(0, Player.BombTrigger):
DealDamage(Player.BombMult*(Damage + Player.BombBonus + Player.TempBombBonus), Foe, Player)
if Player.BombMult*(Damage + Player.BombBonus + Player.TempBombBonus) >= 5:
Player.Search("BombDamage5", Foe)
Player.TempBombBonus = 0
def GainFreeze(Player, Foe, FreezeCount):
Player.Freeze = Player.Freeze + FreezeCount
def GainStun(Player, Foe, StunCount):
Player.Stun = Player.Stun + StunCount
def GainPoison(Player, Foe, PoisonStacks):
Player.Poison = Player.Poison + PoisonStacks
Foe.Search("GainPoison", Player)
def GainRiptide(Player, Foe, RiptideStacks):
Player.Riptide = Player.Riptide + RiptideStacks
def GainAcid(Player, Foe, AcidStacks):
Player.Acid = Player.Acid + AcidStacks
def GainRegen(Player, Foe, RegenStacks):
Player.Regen = Player.Regen + RegenStacks
def GainPurity(Player, Foe, PurityStacks):
PurityMult = 1
if "LakebedSword" in Player.Items:
PurityMult = 2
if PurityStacks > 0:
Player.Purity = Player.Purity + PurityStacks
elif Player.Purity >= -PurityStacks and PurityStacks < 0:
Player.Purity = Player.Purity + PurityStacks
elif Player.Purity < -PurityStacks and PurityStacks < 0:
PurityStacks = -Player.Purity
Player.Purity = 0
if PurityStacks < 0:
Player.Attack = Player.Attack - PurityStacks*PurityMult
HealingCalc(Player, Foe, -3*PurityStacks*PurityMult) #I think its 3*Purity lost. and not just 3 hp everytime its lost
#StatusLose
def Cooldowned(Player, Foe):
Player.Search("CooldownTrigger", Foe)
def EndTurn(Player, Foe, TurnNum):
RipTriggs = Count(Player, "RiptideTriggers") + Count(Foe, "RiptideTriggers")
if TurnNum == 0:
Player.FirstTurn = False
Player.FirstTurnStrike = False
Player.FirstTurnPostStrike = False
#Player.Search("FirstTurn", Foe) #Idk why this was here
if Player.Freeze > 0:
StatusInterp("Freeze", Player, Foe, -1)
#Freeze(-1, Foe, Player)
if Player.Regen > 0:
if "GraniteQuill" in Player.Items:
ArmorGain(Player, Foe, Player.Regen)
StatusInterp("Regen", Player, Foe, -1)
#GainRegen(Player, Foe, -1)
#elif "LiferootHammer" in Player.Items:
#Value = 1
#if not Player.HealingDisabled:
#if Player.CurrentHP/Player.MaxHP < 0.5:
#Value = Player.TwilightCrestMult*Value
#if Player.Stun > 0:
#Value = Value*Player.VampireCloak
#Value = Value*Player.SanguineScepterMult
#if Player.MaxHP - Player.CurrentHP < Player.Regen*Value:
#Player.MaxHP = Player.MaxHP + Player.Regen*Value
#HealingCalc(Player, Foe, Player.Regen)
#StatusInterp("Regen", Player, Foe, -1)
else:
HealingCalc(Player, Foe, Player.Regen)
StatusInterp("Regen", Player, Foe, -1)
#GainRegen(Player, Foe, -1)
if Player.Stun > 0:
StatusInterp("Stun", Player, Foe, -1)
#Stun(-1, Foe, Player)
if Player.Riptide > 0:
if Player.FirstRiptide:
Player.Search("FirstRiptide", Foe)
Foe.Search("FirstRiptide", Player)
Player.FirstRiptide = False
Foe.FirstRiptide = False
for nn in range(0, RipTriggs + 1):
StatusInterp("Riptide", Player, Foe, -1)
#GainRiptide(Player, Foe, -1)
Player.Search("RiptideDamage", Foe)
Foe.Search("RiptideDamage", Player)
DealDamage(5, Foe, Player)
Player.Search("EndTurn", Foe)
Player.SecondTakeDamage = True
Player.TakeDamageCount = 0
#Also do other stuff like reduce freezecount activate turn end items
def Death(Player): #Will prevent a player who drops to 0 or less hp to not heal
if Player.CurrentHP <= 0:
Player.HealingDisabled = True
def HydraCheck(Player):
if "AcidHead" in Player.Items or "RiptideHead" in Player.Items or "PoisonHead" in Player.Items or "StunHead" in Player.Items:
if Player.CurrentHP <= 0:
LoadNextHydra(Player)
def LoadNextHydra(Player):
NewEnemy = []
if "AcidHead" in Player.Items:
NewEnemy = Enemies("RiptideHead", 3)
if Player.Quality == [1]:
NewEnemy = Enemies("PoisonHead", 3)
elif "RiptideHead" in Player.Items:
NewEnemy = Enemies("PoisonHead", 3)
if Player.Quality == [2]:
NewEnemy = Enemies("StunHead", 3)
elif "PoisonHead" in Player.Items:
if not Player.Quality == [3]:
NewEnemy = Enemies("StunHead", 3)
elif "StunHead" in Player.Items:
Player.Armor = Player.Armor
if not "StunHead" in Player.Items and not NewEnemy == []: #and not Player.Quality == [3]:
Player.CurrentHP = NewEnemy[0]
Player.MaxHP = NewEnemy[1]
Player.Attack = NewEnemy[2]
Player.Armor = NewEnemy[3]
Player.Speed = NewEnemy[4]
Player.Items = NewEnemy[5]
#Technically I should reset all the starting triggers but I dont think they matter
#Player.Order = Order #I dont think who is attacking next changes on hydra death
#Foe.Order = Order
#Write a version without output and MAYBE check each time someone loses hp?
#Then have one at the end that displays the ending turns results
def checkLife(U1, U2, P): #Checks which player died and displays the values
x = 0
if U1.CurrentHP <= 0:
#print("Player", P[0], "has died first")
#print("Player", P[1], "has won:", U2.CurrentHP,"/", U2.MaxHP, "HP", U2.Armor, "Armor", U2.Attack, "Attack")
U1.Alive = False
x = 1
if U2.CurrentHP <= 0:
#print("Player", P[1], "has died first")
#print("Player", P[0], "has won:", U1.CurrentHP,"/", U1.MaxHP, "HP", U1.Armor, "Armor", U1.Attack, "Attack")
U2.Alive = False
x = 1
return x
#[10; 10; 3; 0; 4; SwordOfTheHero, CuttingEdge, ; 0; 0]
#[1; 1; 1; 0; 0; BluntEdge, HornedHelmet, HornedHelmet, HornedHelmet, VampiricWine; 0; 0]
def WriteLog(Player, Foe, Turn):
LogBox = document.getElementById("Log")
LogBox.append("Turn: ", Turn + 1)
LogBox.innerHTML += "