奖励已经双倍奖励
This commit is contained in:
@@ -13,6 +13,7 @@ import { EquipSpecialAttr } from "../common/config/Equips";
|
||||
import { FightSet, getExpDrops, getStoneDrops, TooltipTypes } from "../common/config/Mission";
|
||||
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
||||
import { EnhancementType } from "../common/config/LevelUp";
|
||||
import { MonsterDropManager } from "../common/config/Items";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@@ -254,11 +255,16 @@ export class HeroViewComp extends CCComp {
|
||||
this.is_count_dead=true
|
||||
if(this.fac==FacSet.MON){
|
||||
this.scheduleOnce(()=>{
|
||||
oops.message.dispatchEvent(GameEvent.MonDead)
|
||||
let drop_item=this.do_drop()
|
||||
if(drop_item.length>0){
|
||||
oops.message.dispatchEvent(GameEvent.MonDead,{mon_uuid:this.hero_uuid,drops:drop_item})
|
||||
}
|
||||
},0.1)
|
||||
}
|
||||
if(this.fac==FacSet.HERO){
|
||||
oops.message.dispatchEvent(GameEvent.HeroDead)
|
||||
this.scheduleOnce(()=>{
|
||||
oops.message.dispatchEvent(GameEvent.HeroDead,{hero_uuid:this.hero_uuid})
|
||||
},0.1)
|
||||
}
|
||||
|
||||
if(this.fac==FacSet.HERO){
|
||||
@@ -268,7 +274,11 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
|
||||
}
|
||||
|
||||
do_drop(){
|
||||
let drop_item=MonsterDropManager.calculateMonsterDrops(this.hero_uuid,smc.data.mission,1)
|
||||
console.log("[HeroViewComp]:do_drop",this.hero_uuid,drop_item)
|
||||
return drop_item
|
||||
}
|
||||
add_debuff(type:number,deV:number,deC:number,deR:number){
|
||||
let n_deR=deR-this.Attrs[BuffAttr.DEBUFF_DOWN]
|
||||
let r=RandomManager.instance.getRandomInt(0,100) // 随机数
|
||||
|
||||
@@ -52,7 +52,7 @@ export class SkillConComp extends CCComp {
|
||||
}
|
||||
if(skills[1]){
|
||||
if(this.HeroView.fac==FacSet.HERO) {
|
||||
console.log("[SkillConComp] 角色状态:",this.HeroView.hero_name+"=>能量:"+this.HeroView.power+"/"+this.HeroView.power_max,skills)
|
||||
// console.log("[SkillConComp] 角色状态:",this.HeroView.hero_name+"=>能量:"+this.HeroView.power+"/"+this.HeroView.power_max,skills)
|
||||
}
|
||||
this.HeroView.power+=(1+this.HeroView.Attrs[BuffAttr.POWER_UP])*dt*SKILL_CONST.POWER_UP
|
||||
let progress=this.HeroView.power/this.HeroView.power_max
|
||||
@@ -223,7 +223,7 @@ export class SkillConComp extends CCComp {
|
||||
|
||||
onDestroy() {
|
||||
// 清理所有定时器
|
||||
console.log("[SkillConComp]:onDestroy:",this.node.name)
|
||||
// console.log("[SkillConComp]:onDestroy:",this.node.name)
|
||||
Object.values(this._timers).forEach(clearTimeout);
|
||||
this._timers = {};
|
||||
// 移除事件监听
|
||||
|
||||
Reference in New Issue
Block a user