Merge pull request #1182 from IceCola97/PR-Branch
修复globalskill移除问题、attaclTo拼写错误
This commit is contained in:
commit
027fee2ca9
|
@ -4653,8 +4653,14 @@ export class Game extends Uninstantable {
|
|||
}
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { lib.element.Player } player
|
||||
*/
|
||||
static removeGlobalSkill(skill) {
|
||||
static removeGlobalSkill(skill, player) {
|
||||
const players = lib.skill.globalmap[skill];
|
||||
if(player && Array.isArray(players)) {
|
||||
lib.skill.globalmap[skill].remove(player);
|
||||
if(players.length) return;
|
||||
}
|
||||
lib.skill.global.remove(skill);
|
||||
delete lib.skill.globalmap[skill];
|
||||
for (let i in lib.hook.globalskill) {
|
||||
|
|
|
@ -2012,8 +2012,8 @@ export class Get extends Uninstantable {
|
|||
if (info.globalTo) {
|
||||
n += info.globalTo;
|
||||
}
|
||||
if (info.attaclTo) {
|
||||
m += info.attaclTo;
|
||||
if (info.attackTo) {
|
||||
m += info.attackTo;
|
||||
}
|
||||
}
|
||||
if (method == 'attack') {
|
||||
|
@ -2026,8 +2026,8 @@ export class Get extends Uninstantable {
|
|||
// for(let i=0;i<equips2.length;i++){
|
||||
// let info=get.info(equips2[i]).distance;
|
||||
// if(!info) continue;
|
||||
// if(info.attaclTo){
|
||||
// m+=info.attaclTo;
|
||||
// if(info.attackTo){
|
||||
// m+=info.attackTo;
|
||||
// }
|
||||
// }
|
||||
// return n;
|
||||
|
|
|
@ -1970,8 +1970,8 @@ export class Player extends HTMLDivElement {
|
|||
m += info.globalTo;
|
||||
n += info.globalTo;
|
||||
}
|
||||
if (info.attaclTo) {
|
||||
m += info.attaclTo;
|
||||
if (info.attackTo) {
|
||||
m += info.attackTo;
|
||||
}
|
||||
}
|
||||
return m <= range;
|
||||
|
@ -10661,4 +10661,4 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
|
||||
CacheContext.inject(Player.prototype,
|
||||
['hasCard','hasValueTarget','getModableSkills','getCardIndex','countCards','getSkills','getUseValue','canUse']);
|
||||
['hasCard','hasValueTarget','getModableSkills','getCardIndex','countCards','getSkills','getUseValue','canUse']);
|
||||
|
|
Loading…
Reference in New Issue