This commit is contained in:
2024-09-29 08:06:30 +08:00
parent 2a88532ef4
commit 331b22da07
31 changed files with 5067 additions and 7357 deletions

View File

@@ -19,6 +19,7 @@ import { RandomManager } from "../../../../extensions/oops-plugin-framework/asse
import { HeroSet,MonSet } from "../common/config/heroSet";
import { Role } from "../Role/Role";
import { MoveToComp } from "../common/ecs/position/MoveTo";
import { Talents } from "../common/config/TalentSet";
/** 角色实体 */
@ecs.register(`Hero`)
export class Hero extends ecs.Entity {
@@ -59,24 +60,26 @@ export class Hero extends ecs.Entity {
var hv = node.getComponent(HeroViewComp)!;
// console.log("hero_init",buff)
let hero_set= smc.heros[uuid]
let role_talent= smc.vm_data.talent
let talents=Talents;
hv.scale = 1;
hv.speed =hv.ospeed = hero_set.speed;
hv.hero_uuid= uuid;
hv.hero_name= hero_set.name;
hv.hp= hv.hp_max =Math.floor(hero_set.hp*(1+smc.vm_data.talent[11].bonus*smc.vm_data.talent[11].lv)*smc.vm_data.mission.hero.hp);
hv.atk = Math.floor(hero_set.atk*(1+smc.vm_data.talent[12].bonus*smc.vm_data.talent[12].lv))
hv.atk_cd = hero_set.atk_cd*(1-smc.vm_data.talent[13].bonus*smc.vm_data.talent[13].lv);
hv.st_boncus=1+smc.vm_data.talent[15].bonus*smc.vm_data.talent[15].lv;
hv.s_boncus=1+smc.vm_data.talent[16].bonus*smc.vm_data.talent[16].lv;
hv.atk_dis = hero_set.atk_dis;
hv.power = hero_set.power;
hv.level = hero_set.level;
hv.power_max= hero_set.power_max*(1-smc.vm_data.talent[14].bonus*smc.vm_data.talent[14].lv);;
hv.type = hero_set.type;
hv.skill_uuid = hero_set.skill_uuid;
hv.max_skill_uuid = hero_set.max_skill_uuid;
hv.scale = 1;
hv.role_heros_index = index;
hv.type = hero_set.type;
hv.hp= hv.hp_max =Math.floor(hero_set.hp*(1+talents[1011].bonus*role_talent[1011].lv)*smc.vm_data.mission.hero.hp);
hv.atk = Math.floor(hero_set.atk*(1+talents[1012].bonus*role_talent[1012].lv))
hv.atk_cd = hero_set.atk_cd*(1-talents[1013].bonus*role_talent[1013].lv);
hv.st_boncus=1+talents[1015].bonus*role_talent[1015].lv;
hv.s_boncus=1+talents[1016].bonus*role_talent[1016].lv;
hv.power_max= hero_set.power_max*(1-talents[1014].bonus*role_talent[1014].lv);;
this.add(hv);
}
set_ratio(uuid:number){