Archer: geyser stomp crash fix (#200)

* Archer: geyser stomp crash fix

Add spellcost final %

* Remove prints

* Add raw spell display for The Nothing

Co-authored-by: hppeng <hppeng>
This commit is contained in:
hppeng-wynn 2022-08-12 21:39:24 -07:00 committed by GitHub
parent 3241b71879
commit b0ef1c2a39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 17 deletions

View file

@ -1015,7 +1015,7 @@ const atrees = {
"bonuses": [ "bonuses": [
{ {
"type": "prop", "type": "prop",
"abil": "Fierce Stomp", "abil": "Escape",
"name": "aoe", "name": "aoe",
"value": 1 "value": 1
} }

File diff suppressed because one or more lines are too long

View file

@ -86,7 +86,8 @@ let item_fields = [ "name", "displayName", "lore", "color", "tier", "set", "slot
"nMdPct","nMdRaw","nSdPct","nSdRaw","nDamPct","nDamRaw","nDamAddMin","nDamAddMax", // neutral which is now an element "nMdPct","nMdRaw","nSdPct","nSdRaw","nDamPct","nDamRaw","nDamAddMin","nDamAddMax", // neutral which is now an element
/*"mdPct","mdRaw","sdPct","sdRaw",*/"damPct","damRaw","damAddMin","damAddMax", // These are the old ids. Become proportional. /*"mdPct","mdRaw","sdPct","sdRaw",*/"damPct","damRaw","damAddMin","damAddMax", // These are the old ids. Become proportional.
"rMdPct","rMdRaw","rSdPct",/*"rSdRaw",*/"rDamPct","rDamRaw","rDamAddMin","rDamAddMax", // rainbow (the "element" of all minus neutral). rSdRaw is rainraw "rMdPct","rMdRaw","rSdPct",/*"rSdRaw",*/"rDamPct","rDamRaw","rDamAddMin","rDamAddMax", // rainbow (the "element" of all minus neutral). rSdRaw is rainraw
"critDamPct" "critDamPct",
"spPct1Final", "spPct2Final", "spPct3Final", "spPct4Final"
]; ];
// Extra fake IDs (reserved for use in spell damage calculation) : damMult, defMult, poisonPct, activeMajorIDs // Extra fake IDs (reserved for use in spell damage calculation) : damMult, defMult, poisonPct, activeMajorIDs
let str_item_fields = [ "name", "displayName", "lore", "color", "tier", "set", "type", "material", "drop", "quest", "restrict", "category", "atkSpd" ] let str_item_fields = [ "name", "displayName", "lore", "color", "tier", "set", "type", "material", "drop", "quest", "restrict", "category", "atkSpd" ]
@ -127,16 +128,7 @@ let nonRolledIDs = [
"nDam_", "fDam_", "wDam_", "aDam_", "tDam_", "eDam_", "nDam_", "fDam_", "wDam_", "aDam_", "tDam_", "eDam_",
"majorIds", "majorIds",
"damMobs", "damMobs",
"defMobs", "defMobs"
// wynn2 damages.
"eDamAddMin","eDamAddMax",
"tDamAddMin","tDamAddMax",
"wDamAddMin","wDamAddMax",
"fDamAddMin","fDamAddMax",
"aDamAddMin","aDamAddMax",
"nDamAddMin","nDamAddMax", // neutral which is now an element
"damAddMin","damAddMax", // all
"rDamAddMin","rDamAddMax" // rainbow (the "element" of all minus neutral).
]; ];
let rolledIDs = [ let rolledIDs = [
"hprPct", "hprPct",
@ -180,7 +172,8 @@ let rolledIDs = [
"aMdPct","aMdRaw","aSdPct","aSdRaw",/*"aDamPct,"*/"aDamRaw","aDamAddMin","aDamAddMax", "aMdPct","aMdRaw","aSdPct","aSdRaw",/*"aDamPct,"*/"aDamRaw","aDamAddMin","aDamAddMax",
"nMdPct","nMdRaw","nSdPct","nSdRaw","nDamPct","nDamRaw","nDamAddMin","nDamAddMax", // neutral which is now an element "nMdPct","nMdRaw","nSdPct","nSdRaw","nDamPct","nDamRaw","nDamAddMin","nDamAddMax", // neutral which is now an element
/*"mdPct","mdRaw","sdPct","sdRaw",*/"damPct","damRaw","damAddMin","damAddMax", // These are the old ids. Become proportional. /*"mdPct","mdRaw","sdPct","sdRaw",*/"damPct","damRaw","damAddMin","damAddMax", // These are the old ids. Become proportional.
"rMdPct","rMdRaw","rSdPct",/*"rSdRaw",*/"rDamPct","rDamRaw","rDamAddMin","rDamAddMax" // rainbow (the "element" of all minus neutral). rSdRaw is rainraw "rMdPct","rMdRaw","rSdPct",/*"rSdRaw",*/"rDamPct","rDamRaw","rDamAddMin","rDamAddMax", // rainbow (the "element" of all minus neutral). rSdRaw is rainraw
"spPct1Final", "spPct2Final", "spPct3Final", "spPct4Final"
]; ];
let reversedIDs = [ "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ]; let reversedIDs = [ "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ];

View file

@ -1392,7 +1392,7 @@ function displayPowderSpecials(parent_elem, powderSpecials, stats, weapon, overa
} }
function getSpellCost(stats, spell) { function getSpellCost(stats, spell) {
return Math.max(1, getBaseSpellCost(stats, spell)); return Math.max(1, getBaseSpellCost(stats, spell) * (1 + stats.get('spPct'+spell.base_spell+'Final')/100));
} }
function getBaseSpellCost(stats, spell) { function getBaseSpellCost(stats, spell) {

View file

@ -40,6 +40,11 @@ let idPrefixes = {"displayName": "",
"hprRaw":"Health Regen Raw: ", "hprRaw":"Health Regen Raw: ",
"hprPct":"Health Regen %: ", "hprPct":"Health Regen %: ",
"sdRaw":"Raw Spell Damage: ", "sdRaw":"Raw Spell Damage: ",
"eSdRaw":"Raw Earth Spell Damage: ",
"tSdRaw":"Raw Thunder Spell Damage: ",
"wSdRaw":"Raw Water Spell Damage: ",
"fSdRaw":"Raw Fire Spell Damage: ",
"aSdRaw":"Raw Air Spell Damage: ",
"sdPct":"Spell Damage %: ", "sdPct":"Spell Damage %: ",
"mdRaw":"Raw Melee Damage: ", "mdRaw":"Raw Melee Damage: ",
"mdPct":"Melee Damage %: ", "mdPct":"Melee Damage %: ",
@ -117,6 +122,11 @@ let idSuffixes = {"displayName": "",
"hprRaw":"", "hprRaw":"",
"hprPct":"%", "hprPct":"%",
"sdRaw":"", "sdRaw":"",
"eSdRaw":"",
"tSdRaw":"",
"wSdRaw":"",
"fSdRaw":"",
"aSdRaw":"",
"sdPct":"%", "sdPct":"%",
"mdRaw":"", "mdRaw":"",
"mdPct":"%", "mdPct":"%",
@ -309,7 +319,8 @@ let sq2_item_display_commands = [
"str", "dex", "int", "def", "agi", "str", "dex", "int", "def", "agi",
"hpBonus", "hpBonus",
"hprRaw", "hprPct", "hprRaw", "hprPct",
"sdRaw", "sdPct", "sdRaw", "eSdRaw", "tSdRaw", "wSdRaw", "fSdRaw", "aSdRaw",
"sdPct",
"mdRaw", "mdPct", "mdRaw", "mdPct",
"mr", "ms", "mr", "ms",
"ref", "thorns", "ref", "thorns",