修订法强问题

This commit is contained in:
yuexin 2021-03-10 16:41:42 +08:00
parent 70b286f59e
commit d975f564c3
4 changed files with 14 additions and 5 deletions

View File

@ -376,9 +376,10 @@ export class PetHandler {
return value;
};
public addEM(value: number): number{
public addEM(value: number, from: PetHandler): number{
let res = this._addEM(value);
this._owner.onEMChanged(res);
(res != 0) && this.dataChanged(from);
return res;
};
@ -387,7 +388,7 @@ export class PetHandler {
this._enmagic += value;
if(this._enmagic < 0){
this._enmagic = 0;
return tmp;
return -tmp;
}
return value;
};

View File

@ -349,8 +349,8 @@ export class PlayerHandler {
return this._self? this._self._hps: 0;
};
public addEM(value: number): number{
return this._self? this._self.addEM(value): 0;
public addEM(value: number, from: PetHandler): number{
return this._self? this._self.addEM(value, from): 0;
};
public getEM(): number{

View File

@ -644,7 +644,7 @@ export class Skill {
let efftype = SkillEffectType.ENHANCE_MAGIC;
if(tgt.dsttype != GameUnitType.NONE){
let obj = tgt.dst;
let n = obj.addEM(effvalue);
let n = obj.addEM(effvalue, tgt.srcPet());
if(n >= 0){
tgt.success(efftype, n);
}else{

View File

@ -380,6 +380,11 @@ export const enum PowerValueType {
* 2.
* 3.
* 4.
* 5
* 6
* 7
* 11
* 12
*/
export const enum SkillTargetType {
NONE = 0,
@ -387,6 +392,9 @@ export const enum SkillTargetType {
ENEMY_PET = 2,
SELF_PET = 3,
FRIEND_PET = 4,
ENEMY_TEAM = 5,
FIREND_HERO = 6,
FIREND_TEAM = 7,
};
// 技能使用者类型