|
@@ -1,5 +1,6 @@
|
|
|
'use strict'
|
|
'use strict'
|
|
|
|
|
|
|
|
|
|
+const SpeedDivider = [120, 100, 110, 90, 110, 120, 105, 105, 100, 100, 100, 100, 100];
|
|
|
const NOCTAN = new Set([1206, 1210, 1230, 1300, 1301, 1302, 1303, 81212, 201225]),
|
|
const NOCTAN = new Set([1206, 1210, 1230, 1300, 1301, 1302, 1303, 81212, 201225]),
|
|
|
HOOK_LAST = { order: 100, filter: { fake: null } }
|
|
HOOK_LAST = { order: 100, filter: { fake: null } }
|
|
|
|
|
|
|
@@ -23,11 +24,13 @@ class SPPlayer {
|
|
|
crests: new Set(), // Crests
|
|
crests: new Set(), // Crests
|
|
|
epPerks: new Set(), // EP
|
|
epPerks: new Set(), // EP
|
|
|
skillPolishing: new Set(), // Skill Polishing (Talyphs)
|
|
skillPolishing: new Set(), // Skill Polishing (Talyphs)
|
|
|
|
|
+ skillList: new Set(), // for passive skilleffects
|
|
|
|
|
|
|
|
// Equipment / Inventory
|
|
// Equipment / Inventory
|
|
|
hasWeapon: false,
|
|
hasWeapon: false,
|
|
|
hasNocTan: false,
|
|
hasNocTan: false,
|
|
|
- itemPassives: []
|
|
|
|
|
|
|
+ itemPassives: [],
|
|
|
|
|
+ itemPassivityGroups: new Set()
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -57,7 +60,7 @@ class SPPlayer {
|
|
|
mod.hook('S_PLAYER_STAT_UPDATE', mod.majorPatchVersion >= 93 ? 14 : 13, HOOK_LAST, event => {
|
|
mod.hook('S_PLAYER_STAT_UPDATE', mod.majorPatchVersion >= 93 ? 14 : 13, HOOK_LAST, event => {
|
|
|
Object.assign(this, {
|
|
Object.assign(this, {
|
|
|
// Newer classes use a different speed algorithm
|
|
// Newer classes use a different speed algorithm
|
|
|
- attackSpeed: (event.attackSpeed + event.attackSpeedBonus) / (this.job >= 8 ? 100 : event.attackSpeed),
|
|
|
|
|
|
|
+ attackSpeed: (event.attackSpeed + event.attackSpeedBonus) / SpeedDivider[this.job],
|
|
|
stamina: event.stamina
|
|
stamina: event.stamina
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -91,6 +94,15 @@ class SPPlayer {
|
|
|
this.skillPolishing.add(sp.id)
|
|
this.skillPolishing.add(sp.id)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ // Skill List
|
|
|
|
|
+ mod.hook('S_SKILL_LIST', 2, event => {
|
|
|
|
|
+ this.skillList = new Set()
|
|
|
|
|
+
|
|
|
|
|
+ // Passive Skills
|
|
|
|
|
+ for (let skill of event.skills)
|
|
|
|
|
+ if (!skill.active) this.skillList.add(skill.id)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// Equipment / Inventory
|
|
// Equipment / Inventory
|
|
|
mod.game.initialize('inventory');
|
|
mod.game.initialize('inventory');
|
|
|
mod.game.initialize("contract");
|
|
mod.game.initialize("contract");
|
|
@@ -98,7 +110,14 @@ class SPPlayer {
|
|
|
this.hasWeapon = mod.game.inventory.weaponEquipped
|
|
this.hasWeapon = mod.game.inventory.weaponEquipped
|
|
|
this.itemPassives = mod.game.inventory.equipmentPassivities
|
|
this.itemPassives = mod.game.inventory.equipmentPassivities
|
|
|
//this.hasNocTan = !!mod.game.inventory.findInBagOrPockets(NOCTAN)
|
|
//this.hasNocTan = !!mod.game.inventory.findInBagOrPockets(NOCTAN)
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.itemPassivityGroups.clear()
|
|
|
|
|
+ const equipmentSlots = mod.game.inventory.equipment.slots
|
|
|
|
|
+ for(let slot in equipmentSlots)
|
|
|
|
|
+ for (let stat of equipmentSlots[slot].equipmentStats)
|
|
|
|
|
+ for (let group of stat.passivityGroups)
|
|
|
|
|
+ this.itemPassivityGroups.add(group.id)
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|