Merge branch 'second' of git.kingsome.cn:node/card_svr into second
This commit is contained in:
commit
40b2a04dc1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
[{"id":30012,"herounit_id":52012,"ex_skill":0,"follower1id":51072,"follower2id":51082,"follower3id":51032,"follower4id":51052},{"id":30022,"herounit_id":52022,"ex_skill":0,"follower1id":51372,"follower2id":51162,"follower3id":51382,"follower4id":51332},{"id":30032,"herounit_id":52032,"ex_skill":0,"follower1id":51352,"follower2id":51042,"follower3id":51142,"follower4id":51062},{"id":30042,"herounit_id":52042,"ex_skill":0,"follower1id":51062,"follower2id":51122,"follower3id":51112,"follower4id":51042},{"id":30052,"herounit_id":52052,"ex_skill":0,"follower1id":51132,"follower2id":51082,"follower3id":51402,"follower4id":51112},{"id":30062,"herounit_id":52062,"ex_skill":0,"follower1id":51222,"follower2id":51272,"follower3id":51412,"follower4id":51042},{"id":30072,"herounit_id":52072,"ex_skill":0,"follower1id":51012,"follower2id":51082,"follower3id":51402,"follower4id":51152},{"id":30082,"herounit_id":52082,"ex_skill":0,"follower1id":51062,"follower2id":51272,"follower3id":51072,"follower4id":51052},{"id":30092,"herounit_id":52092,"ex_skill":0,"follower1id":51102,"follower2id":51372,"follower3id":51232,"follower4id":51292},{"id":30102,"herounit_id":52102,"ex_skill":0,"follower1id":51022,"follower2id":51092,"follower3id":51192,"follower4id":51392},{"id":30112,"herounit_id":52112,"ex_skill":0,"follower1id":51372,"follower2id":51162,"follower3id":51382,"follower4id":51332},{"id":30122,"herounit_id":52122,"ex_skill":0,"follower1id":51252,"follower2id":51052,"follower3id":51402,"follower4id":51132},{"id":30132,"herounit_id":52132,"ex_skill":0,"follower1id":51032,"follower2id":51342,"follower3id":51412,"follower4id":51252},{"id":30142,"herounit_id":52142,"ex_skill":0,"follower1id":51402,"follower2id":51202,"follower3id":51212,"follower4id":51342}]
|
||||
[{"id":30012,"herounit_id":52012,"org_gift":"1","ex_skill":0,"follower1id":51072,"follower2id":51082,"follower3id":51032,"follower4id":51152},{"id":30022,"herounit_id":52022,"org_gift":"","ex_skill":0,"follower1id":51372,"follower2id":51162,"follower3id":51382,"follower4id":51332},{"id":30032,"herounit_id":52032,"org_gift":"1","ex_skill":0,"follower1id":51052,"follower2id":51042,"follower3id":51122,"follower4id":51062},{"id":30042,"herounit_id":52042,"org_gift":"1","ex_skill":0,"follower1id":51062,"follower2id":51122,"follower3id":51072,"follower4id":51042},{"id":30052,"herounit_id":52052,"org_gift":"","ex_skill":0,"follower1id":51132,"follower2id":51082,"follower3id":51402,"follower4id":51112},{"id":30062,"herounit_id":52062,"org_gift":"","ex_skill":0,"follower1id":51222,"follower2id":51272,"follower3id":51412,"follower4id":51042},{"id":30072,"herounit_id":52072,"org_gift":"1","ex_skill":0,"follower1id":51012,"follower2id":51082,"follower3id":51032,"follower4id":51152},{"id":30082,"herounit_id":52082,"org_gift":"1","ex_skill":0,"follower1id":51062,"follower2id":51082,"follower3id":51072,"follower4id":51052},{"id":30092,"herounit_id":52092,"org_gift":"","ex_skill":0,"follower1id":51102,"follower2id":51372,"follower3id":51232,"follower4id":51292},{"id":30102,"herounit_id":52102,"org_gift":"","ex_skill":0,"follower1id":51022,"follower2id":51092,"follower3id":51192,"follower4id":51392},{"id":30112,"herounit_id":52112,"org_gift":"","ex_skill":0,"follower1id":51372,"follower2id":51162,"follower3id":51382,"follower4id":51332},{"id":30122,"herounit_id":52122,"org_gift":"","ex_skill":0,"follower1id":51252,"follower2id":51352,"follower3id":51402,"follower4id":51132},{"id":30132,"herounit_id":52132,"org_gift":"","ex_skill":0,"follower1id":51032,"follower2id":51342,"follower3id":51412,"follower4id":51252},{"id":30142,"herounit_id":52142,"org_gift":"","ex_skill":0,"follower1id":51402,"follower2id":51202,"follower3id":51212,"follower4id":51342}]
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -4,6 +4,7 @@ export class EffectCardCfg implements Cfg{
|
||||
name: "EffectCardCfg";
|
||||
|
||||
public id: number;
|
||||
public org_gift: number;
|
||||
public type_id: number;
|
||||
public count: number;
|
||||
public weight: number;
|
||||
@ -19,6 +20,7 @@ export class EffectCardCfg implements Cfg{
|
||||
|
||||
public decode(data: any) {
|
||||
this.id = data.id;
|
||||
this.org_gift = data.org_gift;
|
||||
this.type_id = data.type_id;
|
||||
this.count = data.count;
|
||||
this.weight = data.weight;
|
||||
|
@ -10,7 +10,6 @@ export class FormulaCfg implements Cfg{
|
||||
public numtypeid: number;
|
||||
public prerequisite1id: number;
|
||||
public prerequisite2id: number;
|
||||
public : number;
|
||||
|
||||
public decode(data: any) {
|
||||
this.id = data.id;
|
||||
@ -20,7 +19,6 @@ export class FormulaCfg implements Cfg{
|
||||
this.numtypeid = data.numtypeid;
|
||||
this.prerequisite1id = data.prerequisite1id;
|
||||
this.prerequisite2id = data.prerequisite2id;
|
||||
this. = data.;
|
||||
};
|
||||
|
||||
public isOK (uniqueID: number, param1: any, param2: any): boolean {
|
||||
|
@ -5,6 +5,7 @@ export class HeroCfg implements Cfg{
|
||||
|
||||
public id: number;
|
||||
public herounit_id: number;
|
||||
public org_gift: number;
|
||||
public ex_skill: number;
|
||||
public follower1id: number;
|
||||
public follower2id: number;
|
||||
@ -14,6 +15,7 @@ export class HeroCfg implements Cfg{
|
||||
public decode(data: any) {
|
||||
this.id = data.id;
|
||||
this.herounit_id = data.herounit_id;
|
||||
this.org_gift = data.org_gift;
|
||||
this.ex_skill = data.ex_skill;
|
||||
this.follower1id = data.follower1id;
|
||||
this.follower2id = data.follower2id;
|
||||
|
@ -283,7 +283,8 @@ export class BattleHandler {
|
||||
}else if(dst instanceof PlayerHandler){
|
||||
ut = GameUnitType.PLAYER;
|
||||
}
|
||||
return new SkillTarget(sk, src? src._owner: sk._owner, src, dst, ut);
|
||||
let owner = sk? sk._owner: null;
|
||||
return new SkillTarget(sk, src? src._owner: owner, src, dst, ut);
|
||||
};
|
||||
|
||||
public singleSkillTargets(sk: Skill, src: PetHandler, dst: PetHandler | PlayerHandler): SkillTarget[]{
|
||||
@ -294,6 +295,14 @@ export class BattleHandler {
|
||||
return tgt? [tgt]: null;
|
||||
};
|
||||
|
||||
public singleSkillTarget(sk: Skill, src: PetHandler, dst: PetHandler | PlayerHandler): SkillTarget{
|
||||
let tgt = this.buildSkillTarget(sk, src, dst);
|
||||
if(this.isFlowing() && tgt){
|
||||
this._cacheSkills.push(tgt);
|
||||
}
|
||||
return tgt;
|
||||
};
|
||||
|
||||
public getSkillOppTargets(st: SkillTarget): SkillTarget[]{
|
||||
let lst: SkillTarget[] = [];
|
||||
lst.push(st.oppClone());
|
||||
@ -303,9 +312,9 @@ export class BattleHandler {
|
||||
return lst;
|
||||
};
|
||||
|
||||
public getSkillTargets(skill: Skill, param: SkillParam): SkillTarget[]{
|
||||
public getSkillTargets(skill: Skill, param: SkillParam, lastph: PlayerHandler): SkillTarget[]{
|
||||
let lst: SkillTarget[] = [];
|
||||
let players = this.getTargetPlayers(skill._data.friendlyid, param.srcplayer, param.dstplayer);
|
||||
let players = this.getTargetPlayers(skill._data.friendlyid, param.srcplayer, param.dstplayer, lastph);
|
||||
if(players.length > 0){
|
||||
switch(skill._data.targetid){
|
||||
case GameUnitType.PLAYER:
|
||||
@ -353,10 +362,10 @@ export class BattleHandler {
|
||||
return lst;
|
||||
};
|
||||
|
||||
public getTargetPlayers(gct: GameCampType, src:PlayerHandler, dst:PlayerHandler): PlayerHandler[]{
|
||||
public getTargetPlayers(gct: GameCampType, src:PlayerHandler, dst:PlayerHandler, last: PlayerHandler): PlayerHandler[]{
|
||||
let lst: PlayerHandler[] = [];
|
||||
switch(gct){
|
||||
case GameCampType.SELF:
|
||||
case GameCampType.SELFPLAYER:
|
||||
if(src && src.isAlive()){
|
||||
lst.push(src);
|
||||
}
|
||||
@ -390,7 +399,7 @@ export class BattleHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GameCampType.ALL:
|
||||
case GameCampType.ALLPLAYER:
|
||||
for(let [key, obj] of this._players){
|
||||
if(obj && obj.isAlive()){
|
||||
lst.push(obj);
|
||||
@ -433,17 +442,22 @@ export class BattleHandler {
|
||||
}
|
||||
}
|
||||
if(!bfind){
|
||||
return this.getTargetPlayers(GameCampType.RANDOM_ENEMY, src, dst);
|
||||
return this.getTargetPlayers(GameCampType.RANDOM_ENEMY, src, dst, last);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GameCampType.ALL_EXSELF:
|
||||
case GameCampType.ALLPLAYER_EXSELF:
|
||||
for(let [key, obj] of this._players){
|
||||
if(obj && obj.isAlive() && obj != src){
|
||||
lst.push(obj);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GameCampType.LAST_HURT:
|
||||
if(last && last != src && last.isAlive()){
|
||||
lst.push(last);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -116,9 +116,9 @@ export class PetHandler {
|
||||
this.addSkill(skillid);
|
||||
});
|
||||
|
||||
this._owner.onHaloAdd(this);
|
||||
this._owner.onPetBorned(this, param);
|
||||
|
||||
this.born(param);
|
||||
this._owner.onHaloAdd(this);
|
||||
};
|
||||
|
||||
private _I(v: number): number{
|
||||
@ -135,15 +135,6 @@ export class PetHandler {
|
||||
// this._exap = 0;
|
||||
};
|
||||
|
||||
private _addEffHalo(skill: Skill): boolean{
|
||||
if(!this.hasEffHalo(skill)){
|
||||
this._effhalos.set(skill, skill.getHaloValue());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
// this._exap += ap;
|
||||
};
|
||||
|
||||
public getEffHaloV(): number{
|
||||
let n = 0;
|
||||
this._effhalos.forEach((value: number) => {
|
||||
@ -304,8 +295,11 @@ export class PetHandler {
|
||||
return res;
|
||||
};
|
||||
|
||||
public addExAP(value: number, from: PetHandler): number{
|
||||
// return this.addAP(value);
|
||||
public addExAP(value: number, sk: Skill, from: PetHandler): number{
|
||||
if(!this.hasEffHalo(sk)){
|
||||
this._effhalos.set(sk, value);
|
||||
return value;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
@ -341,7 +335,7 @@ export class PetHandler {
|
||||
let res = this.subAP(rv, from);
|
||||
|
||||
if(res != 0){
|
||||
this._owner.onBeHurt(this, res);
|
||||
this._owner.onBeHurt(this, res, from);
|
||||
}
|
||||
|
||||
return res;
|
||||
@ -390,10 +384,6 @@ export class PetHandler {
|
||||
return value;
|
||||
};
|
||||
|
||||
public born(param: SkillParam){
|
||||
this._owner.onPetBorned(this, param);
|
||||
};
|
||||
|
||||
public isAlive(){
|
||||
if(this._isHero){
|
||||
return this._owner.isAlive();
|
||||
@ -544,21 +534,19 @@ export class PetHandler {
|
||||
};
|
||||
|
||||
// 自己的光环是否加到apet上
|
||||
public addEffHalo(apet: PetHandler): boolean{
|
||||
let bok = false;
|
||||
public addEffHalo(apet: PetHandler): number{
|
||||
let res = 0;
|
||||
this._halos.forEach((item: Skill)=>{
|
||||
if(item.canEffect(this, apet)){
|
||||
if(item.isAPHaloSkill()){
|
||||
bok = true;
|
||||
if(apet._addEffHalo(item)){
|
||||
} // 加战力
|
||||
res += apet.addExAP(item.getEffValue(), item, this); // 加战力
|
||||
}else if(item.isBuffHaloSkill()){
|
||||
item.trigger(new SkillParam(0, 0, 0, this._owner,
|
||||
this, apet._owner, apet));
|
||||
} // 触发技能
|
||||
this, apet._owner, apet)); // 触发技能
|
||||
}
|
||||
}
|
||||
});
|
||||
return bok;
|
||||
return res;
|
||||
};
|
||||
|
||||
// remove加在自己身上的属于apet的光环
|
||||
|
@ -4,7 +4,7 @@ import { HeroCfg } from "../../../cfg/parsers/HeroCfg";
|
||||
import { BattleHandler } from "./BattleHandler";
|
||||
import CfgMan from "../CfgMan";
|
||||
import { Pet } from "rooms/schema/Pet";
|
||||
import { CondDecideType, CondType, EffectCardType, GameUnitType, SkillType, SkillUserType, TriggerType } from "../skill/SkillConst";
|
||||
import { CondDecideType, CondType, EffectCardType, GameUnitType, SkillEffectType, SkillType, SkillUserType, TriggerType } from "../skill/SkillConst";
|
||||
import { UnitCfg } from "cfg/parsers/UnitCfg";
|
||||
import { Skill } from "../skill/Skill";
|
||||
import { SkillParam, SkillTarget } from "../skill/SkillParam";
|
||||
@ -324,8 +324,8 @@ export class PlayerHandler {
|
||||
return this._self? this._self.addBaseAP(value, from): 0;
|
||||
};
|
||||
|
||||
public addExAP(value: number, from: PetHandler): number{
|
||||
return 0;
|
||||
public addExAP(value: number, sender: Skill, from: PetHandler): number{
|
||||
return this._self? this._self.addExAP(value, sender, from): 0;
|
||||
};
|
||||
|
||||
public getHP(){
|
||||
@ -452,43 +452,72 @@ export class PlayerHandler {
|
||||
* @param only_checkother : 只检查apet加给别人的光环
|
||||
*/
|
||||
public onHaloAdd(apet: PetHandler, only_checkother: boolean = false){
|
||||
let lst: PetHandler[] = [];
|
||||
let pets: Map<PetHandler, number> = new Map();
|
||||
|
||||
if(only_checkother){
|
||||
this._pets.forEach((obj: PetHandler)=>{
|
||||
if(apet.addEffHalo(obj)){
|
||||
lst.push(obj);
|
||||
let n = apet.addEffHalo(obj);
|
||||
if(n != 0){
|
||||
pets.set(obj, n);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(this._self != apet){
|
||||
if(apet.addEffHalo(this._self)){
|
||||
lst.push(this._self);
|
||||
let n = apet.addEffHalo(this._self);
|
||||
if(n != 0){
|
||||
pets.set(this._self, n);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// apet加给自己
|
||||
apet.addEffHalo(apet);
|
||||
let n = apet.addEffHalo(apet);
|
||||
if(n != 0){
|
||||
pets.set(apet, n);
|
||||
}
|
||||
|
||||
// apet加给别人/别人加给apet
|
||||
this._pets.forEach((obj: PetHandler)=>{
|
||||
if(obj != apet){
|
||||
obj.addEffHalo(apet);
|
||||
if(apet.addEffHalo(obj)){
|
||||
lst.push(obj);
|
||||
let n = obj.addEffHalo(apet);
|
||||
if(n != 0){
|
||||
if(pets.has(apet)){
|
||||
pets.set(apet, pets.get(apet) + n);
|
||||
}else{
|
||||
pets.set(apet, n);
|
||||
}
|
||||
}
|
||||
n = apet.addEffHalo(obj);
|
||||
if(n != 0){
|
||||
pets.set(obj, n);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// _self加给apet/apet加给_self
|
||||
if(this._self != apet && this._self){
|
||||
this._self.addEffHalo(apet);
|
||||
if(apet.addEffHalo(this._self)){
|
||||
lst.push(this._self);
|
||||
let n = this._self.addEffHalo(apet);
|
||||
if(n != 0){
|
||||
if(pets.has(apet)){
|
||||
pets.set(apet, pets.get(apet) + n);
|
||||
}else{
|
||||
pets.set(apet, n);
|
||||
}
|
||||
}
|
||||
n = apet.addEffHalo(this._self);
|
||||
if(n != 0){
|
||||
pets.set(this._self, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._owner.onUpdatePetsNotify(lst, apet);
|
||||
if(pets.size > 0){
|
||||
for(let [k, v] of pets){
|
||||
let sk = this._owner.singleSkillTarget(null, apet, k);
|
||||
sk.success(SkillEffectType.POWEREX_ENHANCE, v);
|
||||
sk.success(SkillEffectType.CHG_AP, v);
|
||||
}
|
||||
this._owner.onUpdatePetsNotify([...pets.keys()], apet);
|
||||
}
|
||||
};
|
||||
|
||||
public onHaloRemove(apet: PetHandler){
|
||||
@ -523,8 +552,8 @@ export class PlayerHandler {
|
||||
this.singleCheckSkills(apet, TriggerType.BE_ATTACK, null, sp);
|
||||
};
|
||||
|
||||
public onBeHurt(apet: PetHandler, value: number){
|
||||
this.singleCheckSkills(apet, TriggerType.BE_HURT);
|
||||
public onBeHurt(apet: PetHandler, value: number, from: PetHandler){
|
||||
this.singleCheckSkills(apet, TriggerType.BE_HURT, from._owner);
|
||||
};
|
||||
|
||||
public onShieldUsed(apet: PetHandler){
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { sendFriendRequest } from "@colyseus/social";
|
||||
import { SkillCfg } from "cfg/parsers/SkillCfg";
|
||||
import e from "express";
|
||||
import { SKillEffectData } from "message/SkillInfo";
|
||||
@ -177,7 +178,7 @@ export class Skill {
|
||||
|
||||
// 技能光环是否能影响dst
|
||||
canEffect(srcpet: PetHandler, dstpet: PetHandler){
|
||||
if(this._data.friendlyid != GameCampType.SELF){
|
||||
if(this._data.friendlyid != GameCampType.SELFPLAYER){
|
||||
return false;
|
||||
}
|
||||
let tgok = false;
|
||||
@ -223,8 +224,8 @@ export class Skill {
|
||||
return this._owner._owner.singleSkillTargets(this, this._petowner, this._petowner);
|
||||
};
|
||||
|
||||
getTargets(param: SkillParam): SkillTarget[]{
|
||||
return this._owner._owner.getSkillTargets(this, param);
|
||||
getTargets(param: SkillParam, lastph?: PlayerHandler): SkillTarget[]{
|
||||
return this._owner._owner.getSkillTargets(this, param, lastph);
|
||||
};
|
||||
|
||||
getOppTargets(st: SkillTarget): SkillTarget[]{
|
||||
@ -293,7 +294,8 @@ export class Skill {
|
||||
}
|
||||
};
|
||||
|
||||
_triggerSubSkill(sk: Skill, skid: number, skusertype: number, skcount: number, skmaxcount: number, param: SkillParam, sts: SkillTarget[], cb?: any){
|
||||
_triggerSubSkill(sk: Skill, skid: number, skusertype: number, skcount: number, skmaxcount: number,
|
||||
param: SkillParam, sts: SkillTarget[], cb: any, lastph: PlayerHandler){
|
||||
if(skid && !sk){
|
||||
sk = this._owner.newSkill(skid);
|
||||
sk.setOrignParam(this._orign_effcnt, this._orign_cardpt, this._from, this._petowner, 0);
|
||||
@ -314,7 +316,7 @@ export class Skill {
|
||||
let ncount = this.getQuoteValue(skcount, skmaxcount, this._orign_effcnt);
|
||||
|
||||
for(let i=0; i<ncount;i++){
|
||||
sk.trigger(param, cb);
|
||||
sk.trigger(param, cb, lastph);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -337,7 +339,7 @@ export class Skill {
|
||||
this._cb && this._cb(this, param, res);
|
||||
};
|
||||
|
||||
trigger(param: SkillParam, cb?: any) {
|
||||
trigger(param: SkillParam, cb?: any, lastph?: PlayerHandler) {
|
||||
let bnormal = !this._sts;
|
||||
|
||||
let ncount = this.getFinalValue(EnhanceCustomType.RELEASE_TIMES, this._data.release_times,
|
||||
@ -345,23 +347,23 @@ export class Skill {
|
||||
|
||||
for(let i = 0; i < ncount; i++){
|
||||
if(bnormal){
|
||||
this.setTargets(this.getTargets(param));
|
||||
this.setTargets(this.getTargets(param, lastph));
|
||||
}
|
||||
|
||||
if(!this.isSummonSkill()){
|
||||
this._real_trigger(param, cb);
|
||||
|
||||
this._triggerSubSkill(this._subskill, this._data.quoteskillid, this._data.skill_usersid,
|
||||
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb);
|
||||
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb, lastph);
|
||||
|
||||
this._triggerSubSkill(this._subskill2, this._data.quoteskill2id, this._data.skill2_usersid,
|
||||
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb);
|
||||
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb, lastph);
|
||||
}else{
|
||||
this._triggerSubSkill(this._subskill, this._data.quoteskillid, this._data.skill_usersid,
|
||||
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb);
|
||||
this._data.quoteskill_times, this._data.quoteskill_timesmax, param, this._sts, cb, lastph);
|
||||
|
||||
this._triggerSubSkill(this._subskill2, this._data.quoteskill2id, this._data.skill2_usersid,
|
||||
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb);
|
||||
this._data.quoteskill2_times, this._data.quoteskill2_timesmax, param, this._sts, cb, lastph);
|
||||
|
||||
this._real_trigger(param, cb);
|
||||
}
|
||||
@ -386,7 +388,7 @@ export class Skill {
|
||||
}
|
||||
}
|
||||
})){
|
||||
this.trigger(tg_target, cb);
|
||||
this.trigger(tg_target, cb, tg_value);
|
||||
return 1;
|
||||
}else{
|
||||
return 0;
|
||||
@ -474,7 +476,7 @@ export class Skill {
|
||||
case SkillEffectType.POWEREX_ENHANCE:
|
||||
if(tgt.dsttype != GameUnitType.NONE){
|
||||
let n = efftype == SkillEffectType.POWER_ENHANCE? tgt.dst.addBaseAP(effvalue, tgt.srcPet())
|
||||
: tgt.dst.addExAP(effvalue, tgt.srcPet());
|
||||
: tgt.dst.addExAP(effvalue, this, tgt.srcPet());
|
||||
tgt.success(efftype, n);
|
||||
tgt.success(SkillEffectType.CHG_AP, n);
|
||||
}else{
|
||||
|
@ -349,19 +349,21 @@ export const enum GameUnitType {
|
||||
* 8.全部敌方(势力)中的随机一个
|
||||
* 9.先对家,不存在,执行第八条
|
||||
* 10.(自己外)全体(势力);两个对手+自己的队友
|
||||
* 11.对自己造成伤害的敌方(势力)
|
||||
*/
|
||||
export const enum GameCampType {
|
||||
NONE = 0,
|
||||
SELF = 1,
|
||||
SELFPLAYER = 1,
|
||||
FRIEND = 2,
|
||||
MYTEAM = 3,
|
||||
ENEMY = 4,
|
||||
ENEMYTEAM = 5,
|
||||
ALL = 6,
|
||||
ALLPLAYER = 6,
|
||||
RANDOM_US = 7,
|
||||
RANDOM_ENEMY = 8,
|
||||
FACE_ENEMY = 9,
|
||||
ALL_EXSELF = 10,
|
||||
ALLPLAYER_EXSELF = 10,
|
||||
LAST_HURT = 11,
|
||||
};
|
||||
|
||||
// 战力参数数值
|
||||
|
@ -85,15 +85,18 @@ export class SkillTarget{
|
||||
|
||||
res: SkillResult[];
|
||||
|
||||
constructor(skill: Skill, splayer?: PlayerHandler, spet?: PetHandler, dstobj?: any, dsttype?: GameUnitType) {
|
||||
constructor(skill: Skill | number, splayer?: PlayerHandler, spet?: PetHandler, dstobj?: any, dsttype?: GameUnitType) {
|
||||
let bsk = skill instanceof Skill;
|
||||
let sk = bsk? (skill as Skill): null;
|
||||
let sid = !bsk? (skill as number): 0;
|
||||
this.srcplayer = splayer;
|
||||
this.srcpet = spet;
|
||||
this.srcskill = skill;
|
||||
this.srcskillid = skill? skill._id: 0;
|
||||
this.srcskilltype = skill? skill._data.effect_typeid: 0;
|
||||
this.srcskill = sk;
|
||||
this.srcskillid = sk? sk._id: sid;
|
||||
this.srcskilltype = sk? sk._data.effect_typeid: 0;
|
||||
this.dst = dstobj;
|
||||
this.dsttype = dsttype;
|
||||
this.lasttime = skill? skill._data.indicate_time: 0;
|
||||
this.lasttime = sk? sk._data.indicate_time: 0;
|
||||
};
|
||||
|
||||
public LoadParam(sp: SkillParam){
|
||||
|
Loading…
x
Reference in New Issue
Block a user