|
|
@@ -287,15 +287,19 @@ export class BulletCount extends Component {
|
|
|
}
|
|
|
// 获取多重射击技能等级
|
|
|
const multiShotSkillLevel = skillManager.getSkillLevel('multi_shots');
|
|
|
+ console.log(`[BulletCount] 多重射击技能等级: ${multiShotSkillLevel}`);
|
|
|
if (multiShotSkillLevel <= 0) {
|
|
|
+ console.log(`[BulletCount] 技能等级为0,返回原配置`);
|
|
|
return originalConfig; // 技能等级为0,返回原配置
|
|
|
}
|
|
|
const bulletCountConfig = originalConfig.bulletConfig.count;
|
|
|
// 计算多重射击几率
|
|
|
const baseMultiShotChance = 0; // 基础几率为0
|
|
|
const multiShotChance = SkillManager.calculateMultiShotChance(baseMultiShotChance, multiShotSkillLevel);
|
|
|
+ console.log(`[BulletCount] 多重射击几率: ${multiShotChance}`);
|
|
|
// 检查是否触发多重射击
|
|
|
const shouldTriggerMultiShot = SkillManager.rollMultiShot(multiShotChance);
|
|
|
+ console.log(`[BulletCount] 是否触发多重射击: ${shouldTriggerMultiShot}`);
|
|
|
if (!shouldTriggerMultiShot) {
|
|
|
return originalConfig; // 未触发多重射击,返回原配置
|
|
|
}
|
|
|
@@ -304,13 +308,12 @@ export class BulletCount extends Component {
|
|
|
const multiShotBulletCount = SkillManager.calculateMultiShotBulletCount(baseBulletCount, multiShotSkillLevel);
|
|
|
// 创建修改后的配置
|
|
|
const modifiedConfig: any = JSON.parse(JSON.stringify(originalConfig)); // 深拷贝
|
|
|
- // 修改子弹配置为散射模式
|
|
|
+ // 修改子弹配置为连射模式(同一方向连续发射)
|
|
|
modifiedConfig.bulletConfig.count = {
|
|
|
- type: 'spread',
|
|
|
- amount: multiShotBulletCount,
|
|
|
- spreadAngle: 30, // 30度散射角度,可以根据需要调整
|
|
|
- burstCount: bulletCountConfig.burstCount || 1,
|
|
|
- burstDelay: bulletCountConfig.burstDelay || 0
|
|
|
+ type: 'burst',
|
|
|
+ amount: 2, // 每次连射发射1发子弹
|
|
|
+ burstCount: multiShotBulletCount, // 连射次数
|
|
|
+ burstDelay: 50 // 连射间隔50毫秒,可以根据需要调整
|
|
|
};
|
|
|
console.log(`多重射击触发!技能等级: ${multiShotSkillLevel}, 子弹数量: ${multiShotBulletCount}`);
|
|
|
return modifiedConfig;
|