奖励已经双倍奖励

This commit is contained in:
panfudan
2025-08-19 19:40:34 +08:00
parent 22f35893d7
commit 854affeaae
32 changed files with 12848 additions and 7746 deletions

View File

@@ -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) // 随机数