Adv item search: don't use identifiers with '+' so tokenization of addition operator works properly
This commit is contained in:
parent
e33d3735b5
commit
19534cdea0
2 changed files with 5 additions and 5 deletions
|
@ -98,7 +98,7 @@ Left of colon is what you type into the search bar (sometimes multiple things ca
|
||||||
['spelldmg', 'spelldam', 'spelldmg%', 'spelldam%', 'sdpct']: Spell Damage (%)
|
['spelldmg', 'spelldam', 'spelldmg%', 'spelldam%', 'sdpct']: Spell Damage (%)
|
||||||
['spellrawdmg', 'spellrawdam', 'spellneutraldmg', 'spellneutraldam', 'sdraw']: Spell Damage (Raw)
|
['spellrawdmg', 'spellrawdam', 'spellneutraldmg', 'spellneutraldam', 'sdraw']: Spell Damage (Raw)
|
||||||
['attackspeed', 'atkspd']: Item Attack Speed
|
['attackspeed', 'atkspd']: Item Attack Speed
|
||||||
['bonusattackspeed', 'bonusatkspd', 'attackspeedid', 'atkspdid', 'attackspeed+', 'atkspd+', 'atktier']: Attack Speed Bonus
|
['bonusattackspeed', 'bonusatkspd', 'attackspeedid', 'atkspdid', 'atktier']: Attack Speed Bonus
|
||||||
['sumattackspeed', 'totalattackspeed', 'sumatkspd', 'totalatkspd', 'sumatktier', 'totalatktier']: Total Attack Speed (Base speed + bonus)
|
['sumattackspeed', 'totalattackspeed', 'sumatkspd', 'totalatkspd', 'sumatktier', 'totalatktier']: Total Attack Speed (Base speed + bonus)
|
||||||
|
|
||||||
['earthdef', 'edef']: Earth Defense Raw
|
['earthdef', 'edef']: Earth Defense Raw
|
||||||
|
@ -116,7 +116,7 @@ Left of colon is what you type into the search bar (sometimes multiple things ca
|
||||||
['sumdef%', 'totaldef%', 'sumdefpct', 'totaldefpct']: Total Defense %
|
['sumdef%', 'totaldef%', 'sumdefpct', 'totaldefpct']: Total Defense %
|
||||||
|
|
||||||
['health', 'hp']: Health
|
['health', 'hp']: Health
|
||||||
['bonushealth', 'healthid', 'bonushp', 'hpid', 'health+', 'hp+', 'hpbonus']: Health bonus
|
['bonushealth', 'healthid', 'bonushp', 'hpid', 'hpbonus']: Health bonus
|
||||||
['sumhealth', 'sumhp', 'totalhealth', 'totalhp']: Total Health (health + health bonus)
|
['sumhealth', 'sumhp', 'totalhealth', 'totalhp']: Total Health (health + health bonus)
|
||||||
|
|
||||||
['hpregen', 'hpr', 'hr', 'hprraw']: Raw Health Regen
|
['hpregen', 'hpr', 'hr', 'hprraw']: Raw Health Regen
|
||||||
|
|
|
@ -156,7 +156,7 @@ const itemQueryProps = (function() {
|
||||||
|
|
||||||
const atkSpdIndices = { SUPER_SLOW: -3, VERY_SLOW: -2, SLOW: -1, NORMAL: 0, FAST: 1, VERY_FAST: 2, SUPER_FAST: 3 };
|
const atkSpdIndices = { SUPER_SLOW: -3, VERY_SLOW: -2, SLOW: -1, NORMAL: 0, FAST: 1, VERY_FAST: 2, SUPER_FAST: 3 };
|
||||||
prop(['attackspeed', 'atkspd'], (i, ie) => i.atkSpd ? atkSpdIndices[i.atkSpd] : 0);
|
prop(['attackspeed', 'atkspd'], (i, ie) => i.atkSpd ? atkSpdIndices[i.atkSpd] : 0);
|
||||||
maxId(['bonusattackspeed', 'bonusatkspd', 'attackspeedid', 'atkspdid', 'attackspeed+', 'atkspd+', 'atktier'], 'atkTier');
|
maxId(['bonusattackspeed', 'bonusatkspd', 'attackspeedid', 'atkspdid', 'atktier'], 'atkTier');
|
||||||
sum(['sumattackspeed', 'totalattackspeed', 'sumatkspd', 'totalatkspd', 'sumatktier', 'totalatktier'], props.atkspd, props.atktier);
|
sum(['sumattackspeed', 'totalattackspeed', 'sumatkspd', 'totalatkspd', 'sumatktier', 'totalatktier'], props.atkspd, props.atktier);
|
||||||
|
|
||||||
prop(['earthdef', 'edef'], (i, ie) => i.eDef || 0);
|
prop(['earthdef', 'edef'], (i, ie) => i.eDef || 0);
|
||||||
|
@ -174,7 +174,7 @@ const itemQueryProps = (function() {
|
||||||
sum(['sumdef%', 'totaldef%', 'sumdefpct', 'totaldefpct'], props.edefpct, props.tdefpct, props.wdefpct, props.fdefpct, props.adefpct);
|
sum(['sumdef%', 'totaldef%', 'sumdefpct', 'totaldefpct'], props.edefpct, props.tdefpct, props.wdefpct, props.fdefpct, props.adefpct);
|
||||||
|
|
||||||
prop(['health', 'hp'], (i, ie) => i.hp || 0);
|
prop(['health', 'hp'], (i, ie) => i.hp || 0);
|
||||||
maxId(['bonushealth', 'healthid', 'bonushp', 'hpid', 'health+', 'hp+', 'hpbonus'], 'hpBonus');
|
maxId(['bonushealth', 'healthid', 'bonushp', 'hpid', 'hpbonus'], 'hpBonus');
|
||||||
sum(['sumhealth', 'sumhp', 'totalhealth', 'totalhp'], props.hp, props.hpid);
|
sum(['sumhealth', 'sumhp', 'totalhealth', 'totalhp'], props.hp, props.hpid);
|
||||||
|
|
||||||
maxId(['hpregen', 'hpr', 'hr', 'hprraw'], 'hprRaw');
|
maxId(['hpregen', 'hpr', 'hr', 'hprraw'], 'hprRaw');
|
||||||
|
@ -332,7 +332,7 @@ const compileQueryExpr = (function() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// parse an identifier or boolean literal
|
// parse an identifier or boolean literal
|
||||||
if ((m = /^\w[\w\d+%]*/.exec(exprStr.substring(col))) !== null) {
|
if ((m = /^\w[\w\d%]*/.exec(exprStr.substring(col))) !== null) {
|
||||||
switch (m[0]) {
|
switch (m[0]) {
|
||||||
case 'true':
|
case 'true':
|
||||||
tokens.push({ type: 'bool', value: true });
|
tokens.push({ type: 'bool', value: true });
|
||||||
|
|
Loading…
Reference in a new issue