buff需要重置

This commit is contained in:
2025-10-16 16:52:27 +08:00
parent 31eedceeb3
commit d0cd9c1326
21 changed files with 153 additions and 958 deletions

View File

@@ -2,15 +2,11 @@ import { VM } from "../../../../extensions/oops-plugin-framework/assets/libs/mod
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { Initialize } from "../initialize/Initialize"; import { Initialize } from "../initialize/Initialize";
import { GameMap } from "../map/GameMap"; import { GameMap } from "../map/GameMap";
import { HeroUI, VmInfo } from "./config/Mission";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameData, WxCloudApi } from "../wx_clound_client_api/WxCloudApi"; import { GameData, WxCloudApi } from "../wx_clound_client_api/WxCloudApi";
import { gameDataSyncManager } from "./GameDataSyncManager"; import { gameDataSyncManager } from "./GameDataSyncManager";
import { GameSet } from "./config/BoxSet";
import { Test } from "./Test"; import { Test } from "./Test";
import { GameEvent } from "./config/GameEvent"; import { GameEvent } from "./config/GameEvent";
import { Items } from "./config/Items";
import { HeroInfo } from "./config/heroSet";
// import { Role } from "../role/Role"; // import { Role } from "../role/Role";

View File

@@ -1,381 +0,0 @@
import * as exp from "constants";
import { QualitySet } from "./BoxSet";
export enum ItemType{
NORMAL=0,//普通
SPECIAL=1,//特殊 可双击打开
EQUIP=2,//装备
}
// 掉落物品接口
export interface DropItem {
item_uuid: number; // 物品ID
probability: number; // 掉落概率 (0-1之间)
minCount: number; // 最小掉落数量
maxCount: number; // 最大掉落数量
baseCount: number; // 基础掉落数量
growthRate: number; // 增长参数
}
// 怪物掉落配置接口
export interface MonsterDropConfig {
monsterId: number; // 怪物ID
quality: QualitySet; // 怪物品质
drops: DropItem[]; // 掉落物品列表
}
export const Items={
1001:{uuid: 1001,path: "1001",type:1,quality:QualitySet.GREEN,name: "绿色英雄石",info:"稀有英雄升星必须材料", },
1002:{uuid: 1002,path: "1002",type:1,quality:QualitySet.BLUE,name: "蓝色英雄石",info:"史诗英雄升星必须材料", },
1003:{uuid: 1003,path: "1003",type:1,quality:QualitySet.PURPLE,name: "紫色英雄石",info:"传说英雄升星必须材料", },
1004:{uuid: 1004,path: "1004",type:1,quality:QualitySet.ORANGE,name: "红色英雄石",info:"传说英雄升星必须材料", },
1005:{uuid: 1005,path: "1005",type:1,quality:QualitySet.ORANGE,name: "招募劵",info:"可以在英雄酒馆招募英雄", },
1006:{uuid: 1006,path: "1006",type:1,quality:QualitySet.BLUE,name: "铜钥匙",info:"解锁稀有英雄 也可以直接兑换金币", },
1007:{uuid: 1007,path: "1007",type:1,quality:QualitySet.PURPLE,name: "银钥匙",info:"解锁史诗英雄 也可以直接兑换金币", },
1008:{uuid: 1008,path: "1008",type:1,quality:QualitySet.ORANGE,name: "金钥匙",info:"解锁传说英雄 也可以直接兑换金币", },
9001:{uuid: 9001,path: "9001",type:1,quality:QualitySet.GREEN,name: "金币",info:"少许金币", },
9002:{uuid: 9002,path: "9002",type:1,quality:QualitySet.BLUE,name: "小袋金币",info:"一小袋金币", },
9003:{uuid: 9003,path: "9003",type:1,quality:QualitySet.PURPLE,name: "大袋金币",info:"一大袋金币", },
9004:{uuid: 9004,path: "9004",type:1,quality:QualitySet.GREEN,name: "钻石",info:"少许钻石", },
9005:{uuid: 9005,path: "9005",type:1,quality:QualitySet.GREEN,name: "钻石",info:"少许钻石", },
9006:{uuid: 9006,path: "9006",type:1,quality:QualitySet.BLUE,name: "小袋钻石",info:"一小袋钻石", },
9007:{uuid: 9007,path: "9007",type:1,quality:QualitySet.BLUE,name: "大袋钻石",info:"一大袋钻石", },
9008:{uuid: 9008,path: "9008",type:1,quality:QualitySet.PURPLE,name: "小箱钻石",info:"一小箱钻石", },
9009:{uuid: 9009,path: "9009",type:1,quality:QualitySet.PURPLE,name: "大箱钻石",info:"一大箱钻石", },
}
export enum DropKey{
ItemUUId=0, // 物品ID
Pro=1, // 概率
Diff=2, // 上下限差值
Base=3, // 基础数量
GrowthRate=4, // 增长参数
}
// 怪物掉落配置表 - 按照DropKey顺序配置
export const MonsterDropTable: { [monsterId: number]: [number, number, number, number, number][] } = {
// 普通怪物 - 绿色品质
5201: [ // 兽人战士
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.3, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 30%概率掉落铜钥匙
],
5202: [ // 兽人刺客
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.4, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 40%概率掉落铜钥匙
],
5203: [ // 兽人护卫
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.3, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 30%概率掉落铜钥匙
],
5204: [ // 石卫
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.35, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 35%概率掉落铜钥匙
],
5205: [ // 土卫
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.35, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 35%概率掉落铜钥匙
],
5206: [ // 树卫
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.35, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 35%概率掉落铜钥匙
],
5219: [ // 牛头战士
[Items[1001].uuid, 1.0, 1, 1, 0.25], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1-2个绿色英雄石
[Items[1006].uuid, 0.4, 0, 1, 0.15] // [item_uuid, probability, diff, baseCount, growthRate] - 40%概率掉落铜钥匙
],
5220: [ // 牛头战士
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.3, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 30%概率掉落铜钥匙
],
5221: [ // 牛头战士
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.4, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 40%概率掉落铜钥匙
],
5222: [ // 独眼巨人
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.3, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 30%概率掉落铜钥匙
],
5223: [ // 独眼巨人
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.3, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 30%概率掉落铜钥匙
],
5224: [ // 独眼巨人
[Items[1001].uuid, 1.0, 0, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个绿色英雄石
[Items[1006].uuid, 0.4, 0, 1, 0.1] // [item_uuid, probability, diff, baseCount, growthRate] - 40%概率掉落铜钥匙
],
// 精英怪物 - 蓝色品质
5225: [ // 精英独眼
[Items[1001].uuid, 1.0, 1, 2, 0.3], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落2-3个绿色英雄石
[Items[1002].uuid, 1.0, 0, 1, 0.25], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个蓝色英雄石
[Items[1006].uuid, 0.6, 1, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 60%概率掉落铜钥匙
[Items[1007].uuid, 0.2, 0, 1, 0.15] // [item_uuid, probability, diff, baseCount, growthRate] - 20%概率掉落银钥匙
],
5226: [ // 精英牛头
[Items[1001].uuid, 1.0, 1, 2, 0.3], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落2-3个绿色英雄石
[Items[1002].uuid, 1.0, 0, 1, 0.25], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个蓝色英雄石
[Items[1006].uuid, 0.6, 1, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 60%概率掉落铜钥匙
[Items[1007].uuid, 0.2, 0, 1, 0.15] // [item_uuid, probability, diff, baseCount, growthRate] - 20%概率掉落银钥匙
],
5227: [ // 精英兽人
[Items[1001].uuid, 1.0, 1, 2, 0.3], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落2-3个绿色英雄石
[Items[1002].uuid, 1.0, 0, 1, 0.25], // [item_uuid, probability, diff, baseCount, growthRate] - 100%掉落1个蓝色英雄石
[Items[1006].uuid, 0.6, 1, 1, 0.2], // [item_uuid, probability, diff, baseCount, growthRate] - 60%概率掉落铜钥匙
[Items[1007].uuid, 0.2, 0, 1, 0.15] // [item_uuid, probability, diff, baseCount, growthRate] - 20%概率掉落银钥匙
]
};
// 基础资源掉落配置表 - 以普通怪为基础值
export const BaseResourceDropConfig = {
// 经验值配置
exp: {
baseValue: 100, // 普通怪基础经验值
stageMultiplier: 1.15, // 关卡倍数 (降低增长)
randomRange: 0.2, // 随机范围 (±20%)
baseProbability: 1.0 // 基础掉落概率 (100%)
},
// 金币配置
gold: {
baseValue: 50, // 普通怪基础金币值
stageMultiplier: 1.12, // 关卡倍数 (降低增长)
randomRange: 0.25, // 随机范围 (±25%)
baseProbability: 0.7 // 基础掉落概率 (70%)
},
// 钻石配置
diamond: {
baseValue: 2, // 基础钻石值
stageMultiplier: 1.05, // 关卡倍数 (大幅降低增长)
randomRange: 0.2, // 随机范围 (±20%)
baseProbability: 0.0 // 基础掉落概率 (0%,需要品质加成)
}
};
// 怪物品质加成配置表 - 使用加法权重
export const QualityBonusConfig = {
[QualitySet.GREEN]: {
// 绿色品质:基础值 + 加成
expBonus: 0, // 经验值加成
goldBonus: 0, // 金币加成
diamondBonus: 0, // 钻石加成
expProbabilityBonus: 0, // 经验掉落概率加成
goldProbabilityBonus: 0, // 金币掉落概率加成
diamondProbabilityBonus: 0 // 钻石掉落概率加成
},
[QualitySet.BLUE]: {
// 蓝色品质:基础值 + 加成
expBonus: 50, // 经验值 +50
goldBonus: 25, // 金币 +25
diamondBonus: 0, // 钻石加成 0
expProbabilityBonus: 0, // 经验掉落概率加成
goldProbabilityBonus: 0.1, // 金币掉落概率 +10%
diamondProbabilityBonus: 0.2 // 钻石掉落概率 +20%
},
[QualitySet.PURPLE]: {
// 紫色品质:基础值 + 加成
expBonus: 100, // 经验值 +100
goldBonus: 50, // 金币 +50
diamondBonus: 1, // 钻石 +1
expProbabilityBonus: 0, // 经验掉落概率加成
goldProbabilityBonus: 0.2, // 金币掉落概率 +20%
diamondProbabilityBonus: 0.1 // 钻石掉落概率 +10%精英10%
},
[QualitySet.ORANGE]: {
// 橙色品质:基础值 + 加成
expBonus: 200, // 经验值 +200
goldBonus: 100, // 金币 +100
diamondBonus: 3, // 钻石 +3
expProbabilityBonus: 0, // 经验掉落概率加成
goldProbabilityBonus: 0.3, // 金币掉落概率 +30%
diamondProbabilityBonus: 1.0 // 钻石掉落概率 +100%BOSS必掉
}
};
// 关卡和buff加成配置表 - 使用加法权重
export const StageBuffBonusConfig = {
// 关卡加成配置
stage: {
expBonusPerStage: 5, // 每关经验值加成
goldBonusPerStage: 2, // 每关金币加成
diamondBonusPerStage: 0.1, // 每关钻石加成
expProbabilityBonusPerStage: 0, // 每关经验掉落概率加成
goldProbabilityBonusPerStage: 0, // 每关金币掉落概率加成
diamondProbabilityBonusPerStage: 0 // 每关钻石掉落概率加成
},
// buff数量加成配置
buff: {
expBonusPerBuff: 10, // 每个buff经验值加成
goldBonusPerBuff: 5, // 每个buff金币加成
diamondBonusPerBuff: 0.5, // 每个buff钻石加成
expProbabilityBonusPerBuff: 0, // 每个buff经验掉落概率加成
goldProbabilityBonusPerBuff: 0.01, // 每个buff金币掉落概率加成
diamondProbabilityBonusPerBuff: 0.005 // 每个buff钻石掉落概率加成
}
};
// 怪物掉落管理器
export class MonsterDropManager {
/**
* 根据怪物ID获取掉落配置
* @param monsterId 怪物ID
* @returns 掉落配置
*/
static getDropConfig(monsterId: number): [number, number, number, number, number][] | null {
return MonsterDropTable[monsterId] || null;
}
/**
* 计算指定关卡数的掉落数量
* @param baseCount 基础数量
* @param growthRate 增长参数
* @param stageNumber 关卡数
* @param diff 上下限差值
* @returns 计算后的掉落数量
*/
static calculateDropCount(baseCount: number, growthRate: number, stageNumber: number, diff: number): number {
// 公式:基础数量 * 增长参数 * 关卡数 + (0-差值的随机数)
const calculatedCount = baseCount * growthRate * stageNumber;
const randomBonus = Math.floor(Math.random() * (diff + 1)); // 0到diff的随机数
const finalCount = calculatedCount + randomBonus;
// 允许掉落数量为0
return Math.max(0, Math.floor(finalCount));
}
/**
* 计算怪物掉落物品
* @param monsterId 怪物ID
* @param stageNumber 关卡数
* @param playerLuck 玩家幸运值加成
* @returns 掉落物品数组
*/
static calculateMonsterDrops(monsterId: number, stageNumber: number, playerLuck: number = 0): Array<{item_uuid: number, count: number}> {
const dropArray = this.getDropConfig(monsterId);
if (!dropArray) {
console.warn(`[MonsterDropManager]: No drop config found for monster ${monsterId}`);
return [];
}
const result: Array<{item_uuid: number, count: number}> = [];
const luckBonus = 1 + (playerLuck * 0.01); // 幸运值加成
// 处理所有掉落物品(统一按概率处理)
dropArray.forEach(dropData => {
const [item_uuid, probability, diff, baseCount, growthRate] = dropData;
if (Math.random() < probability) {
// 使用新的计算公式:基础值*关卡数*增长参数+(0-差值的随机数)
const finalCount = this.calculateDropCount(baseCount, growthRate, stageNumber, diff);
const countWithLuck = Math.floor(finalCount * luckBonus);
result.push({
item_uuid: item_uuid,
count: Math.max(1, countWithLuck) // 确保至少掉落1个
});
}
});
return result;
}
/**
* 预览指定关卡数的掉落数量(不包含随机因素)
* @param monsterId 怪物ID
* @param stageNumber 关卡数
* @returns 掉落物品预览数组
*/
static previewMonsterDrops(monsterId: number, stageNumber: number): Array<{item_uuid: number, baseCount: number, calculatedCount: number, maxCount: number}> {
const dropArray = this.getDropConfig(monsterId);
if (!dropArray) {
console.warn(`[MonsterDropManager]: No drop config found for monster ${monsterId}`);
return [];
}
const result: Array<{item_uuid: number, baseCount: number, calculatedCount: number, maxCount: number}> = [];
// 处理所有掉落物品
dropArray.forEach(dropData => {
const [item_uuid, probability, diff, baseCount, growthRate] = dropData;
const calculatedCount = baseCount * growthRate * stageNumber;
const maxCount = calculatedCount + diff;
result.push({
item_uuid: item_uuid,
baseCount: baseCount,
calculatedCount: Math.floor(calculatedCount),
maxCount: Math.floor(maxCount)
});
});
return result;
}
/**
* 计算怪物基础资源掉落(经验、金币、钻石)
* @param monsterQuality 怪物品质
* @param stageNumber 关卡数
* @param buffCount buff数量
* @returns 基础资源掉落结果
*/
static calculateBaseResourceDrops(monsterQuality: QualitySet, stageNumber: number, buffCount: number = 0): {exp: number, gold: number, diamond: number} {
// 初始化结果对象,确保所有字段都存在
const result: {exp: number, gold: number, diamond: number} = {
exp: 0,
gold: 0,
diamond: 0
};
// 获取品质加成
const qualityBonus = QualityBonusConfig[monsterQuality];
// 计算经验值(必出)
const expConfig = BaseResourceDropConfig.exp;
const expValue = (expConfig.baseValue +
qualityBonus.expBonus +
StageBuffBonusConfig.stage.expBonusPerStage * stageNumber +
StageBuffBonusConfig.buff.expBonusPerBuff * buffCount) *
Math.pow(expConfig.stageMultiplier, stageNumber - 1);
// 添加随机范围
const expRandomFactor = 1 + (Math.random() - 0.5) * 2 * expConfig.randomRange;
result.exp = Math.floor(expValue * expRandomFactor);
// 金币与钻石独立判定,可同时掉落:
// 使用加法权重系统:基础值 + 品质加成 + 关卡加成 + buff加成 + 关卡增长
// 金币判定
const goldProbability = BaseResourceDropConfig.gold.baseProbability +
qualityBonus.goldProbabilityBonus +
StageBuffBonusConfig.stage.goldProbabilityBonusPerStage * stageNumber +
StageBuffBonusConfig.buff.goldProbabilityBonusPerBuff * buffCount;
if (Math.random() < goldProbability) {
const goldConfig = BaseResourceDropConfig.gold;
const goldValue = (goldConfig.baseValue +
qualityBonus.goldBonus +
StageBuffBonusConfig.stage.goldBonusPerStage * stageNumber +
StageBuffBonusConfig.buff.goldBonusPerBuff * buffCount) *
Math.pow(goldConfig.stageMultiplier, stageNumber - 1);
const goldRandomFactor = 1 + (Math.random() - 0.5) * 2 * goldConfig.randomRange;
result.gold = Math.floor(goldValue * goldRandomFactor);
}
// 钻石判定
const diamondProbability = BaseResourceDropConfig.diamond.baseProbability +
qualityBonus.diamondProbabilityBonus +
StageBuffBonusConfig.stage.diamondProbabilityBonusPerStage * stageNumber +
StageBuffBonusConfig.buff.diamondProbabilityBonusPerBuff * buffCount;
if (Math.random() < diamondProbability) {
const diamondConfig = BaseResourceDropConfig.diamond;
const diamondValue = (diamondConfig.baseValue +
qualityBonus.diamondBonus +
StageBuffBonusConfig.stage.diamondBonusPerStage * stageNumber +
StageBuffBonusConfig.buff.diamondBonusPerBuff * buffCount) *
Math.pow(diamondConfig.stageMultiplier, stageNumber - 1);
const diamondRandomFactor = 1 + (Math.random() - 0.5) * 2 * diamondConfig.randomRange;
result.diamond = Math.floor(diamondValue * diamondRandomFactor);
}
return result;
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "49217bd4-ee11-49f7-b404-e8d40478fa2d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,28 +0,0 @@
export const SlvUp =[10,20,40,80,160,320,99999]
export const LvUp =[100]
export enum UpGold {
LvUp=1000,
SlvUp=100,
}
export function getUpGoldByRange(range: number): number {
if (range >= 1 && range <= 10) return 100;
if (range >= 11 && range <= 20) return 2000;
if (range >= 21 && range <= 40) return 3000;
if (range >= 41 && range <= 80) return 4000;
if (range >= 81 && range <= 160) return 5000;
if (range >= 161 && range <= 320) return 6000;
if (range >= 321 && range <= 99999) return 7000;
return 0;
}
export function getUpChipByLv(lv: number): number {
if (lv >= 1 && lv <= 5) return 10;
if (lv >= 6 && lv <= 10) return 20;
if (lv >= 11 && lv <= 15) return 30;
if (lv >= 16 && lv <= 20) return 40;
if (lv >= 21 && lv <= 25) return 50;
if (lv >= 26 && lv <= 30) return 60;
if (lv >= 31 && lv <= 35) return 70;
if (lv >= 36 && lv <= 40) return 80;
if (lv >= 41 && lv <= 45) return 90;
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bde4950f-acae-4c3e-a6a7-39248c34613d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -147,6 +147,7 @@ export enum BuffAttr {
SPEED = 34, //速度 SPEED = 34, //速度
SHIELD = 35, //护盾 SHIELD = 35, //护盾
POWER_MAX = 36, //最大能量 POWER_MAX = 36, //最大能量
MP = 37,
} }
export const getBuffNum=()=>{ export const getBuffNum=()=>{
return { return {
@@ -187,6 +188,7 @@ export const getBuffNum=()=>{
[BuffAttr.SPEED]:0,//速度 [BuffAttr.SPEED]:0,//速度
[BuffAttr.SHIELD]:0,//护盾 [BuffAttr.SHIELD]:0,//护盾
[BuffAttr.POWER_MAX]:0,//最大能量 [BuffAttr.POWER_MAX]:0,//最大能量
[BuffAttr.MP]:0,
} }
} }
export const geDebuffNum=()=>{ export const geDebuffNum=()=>{
@@ -284,7 +286,7 @@ export interface BuffConfig {
// 技能配置接口 - 按照6001格式排列 // 技能配置接口 - 按照6001格式排列
export interface SkillConfig { export interface SkillConfig {
uuid:number,name:string,sp_name:string,AtkedType:AtkedType,path:string,TGroup:TGroup,SType:SType,act:string,DTType:DTType, uuid:number,name:string,sp_name:string,AtkedType:AtkedType,path:string,TGroup:TGroup,SType:SType,act:string,DTType:DTType,
ap:number,cd:number,in:number,hit_num:number,hit:number,hitcd:number,speed:number,cost:number,with:number, ap:number,cd:number,in:number,t_num:number,hit_num:number,hit:number,hitcd:number,speed:number,cost:number,with:number,
buffs:BuffConfig[],debuffs:DebuffConfig[],info:string,hero?:number buffs:BuffConfig[],debuffs:DebuffConfig[],info:string,hero?:number
} }
@@ -293,71 +295,71 @@ export const SkillSet: Record<number, SkillConfig> = {
// ========== 基础攻击 ========== 6001-6099 // ========== 基础攻击 ========== 6001-6099
6001: { 6001: {
uuid:6001,name:"挥击",sp_name:"atk_s1",AtkedType:AtkedType.atked,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6001,name:"挥击",sp_name:"atk_s1",AtkedType:AtkedType.atked,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0.2,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0, ap:100,cd:5,in:0.2,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
}, },
6002: { 6002: {
uuid:6002,name:"挥击",sp_name:"atk2",AtkedType:AtkedType.atked,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6002,name:"挥击",sp_name:"atk2",AtkedType:AtkedType.atked,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
}, },
6003: { 6003: {
uuid:6003,name:"射击",sp_name:"arrow",AtkedType:AtkedType.atked,path:"3037",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6003,name:"射击",sp_name:"arrow",AtkedType:AtkedType.atked,path:"3037",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人释放箭矢,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人释放箭矢,造成100%攻击的伤害"
}, },
6004: { 6004: {
uuid:6004,name:"冰球",sp_name:"am_ice",AtkedType:AtkedType.ice,path:"3034",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6004,name:"冰球",sp_name:"am_ice",AtkedType:AtkedType.ice,path:"3034",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"
}, },
6005: { 6005: {
uuid:6005,name:"火球术",sp_name:"atk_fires",AtkedType:AtkedType.fire,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6005,name:"火球术",sp_name:"atk_fires",AtkedType:AtkedType.fire,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:1,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧" buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"
}, },
6006: { 6006: {
uuid:6006,name:"能量波",sp_name:"am_blue",AtkedType:AtkedType.ice,path:"3034",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6006,name:"能量波",sp_name:"am_blue",AtkedType:AtkedType.ice,path:"3034",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"
}, },
6007: { 6007: {
uuid:6007,name:"圣光波",sp_name:"am_yellow",AtkedType:AtkedType.fire,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6007,name:"圣光波",sp_name:"am_yellow",AtkedType:AtkedType.fire,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧" buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"
}, },
// ========== 大招 ========== 6100-6199 // ========== 大招 ========== 6100-6199
6101: { 6101: {
uuid:6101,name:"护盾",sp_name:"shield",AtkedType:AtkedType.atked,path:"3045",TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single, uuid:6101,name:"护盾",sp_name:"shield",AtkedType:AtkedType.atked,path:"3045",TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single,
ap:0,cd:5,in:0,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0, ap:0,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:3,speed:720,cost:10,with:0,
buffs:[{buff:BuffAttr.SHIELD,buV:2,buC:0,buR:100}],debuffs:[],info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)" buffs:[{buff:BuffAttr.SHIELD,buV:2,buC:0,buR:100}],debuffs:[],info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"
}, },
6102: { 6102: {
uuid:6102,name:"寒冰箭",sp_name:"arrow_blue",AtkedType:AtkedType.ice,path:"3060",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6102,name:"寒冰箭",sp_name:"arrow_blue",AtkedType:AtkedType.ice,path:"3060",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:1,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:1,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:1,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人" buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:1,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"
}, },
6103: { 6103: {
uuid:6103,name:"治疗",sp_name:"heath_small",AtkedType:AtkedType.atked,path:"3056",TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single, uuid:6103,name:"治疗",sp_name:"heath_small",AtkedType:AtkedType.atked,path:"3056",TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single,
ap:0,cd:5,in:0,hit_num:1,hit:0,hitcd:0,speed:0,cost:10,with:0, ap:0,cd:5,in:0,t_num:1,hit_num:1,hit:0,hitcd:0,speed:0,cost:10,with:0,
buffs:[{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"回复最前排队友10%最大生命值的生命" buffs:[{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"回复最前排队友10%最大生命值的生命"
}, },
6104: { 6104: {
uuid:6104,name:"烈焰斩击",sp_name:"max_fireatk",AtkedType:AtkedType.fire,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6104,name:"烈焰斩击",sp_name:"max_fireatk",AtkedType:AtkedType.fire,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害" buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
}, },
6105: { 6105: {
uuid:6105,name:"烈火护盾",sp_name:"max_firedun",AtkedType:AtkedType.atked,path:"3061",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range, uuid:6105,name:"烈火护盾",sp_name:"max_firedun",AtkedType:AtkedType.atked,path:"3061",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:1,speed:80,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:1,speed:80,cost:10,with:90,
buffs:[],debuffs:[],info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害" buffs:[],debuffs:[],info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害"
}, },
6106: { 6106: {
uuid:6106,name:"龙卷风",sp_name:"bwind",AtkedType:AtkedType.wind,path:"3065",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6106,name:"龙卷风",sp_name:"bwind",AtkedType:AtkedType.wind,path:"3065",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:1,speed:360,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:1,speed:360,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人" buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"
}, },
@@ -365,85 +367,85 @@ export const SkillSet: Record<number, SkillConfig> = {
6107: { 6107: {
uuid:6107,name:"烈焰射击",sp_name:"arrow_yellow",AtkedType:AtkedType.fire,path:"3014",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, uuid:6107,name:"烈焰射击",sp_name:"arrow_yellow",AtkedType:AtkedType.fire,path:"3014",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0.5,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人" buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0.5,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"
}, },
6108: { 6108: {
uuid:6108,name:"火墙",sp_name:"max_fwall",AtkedType:AtkedType.atked,path:"3040",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6108,name:"火墙",sp_name:"max_fwall",AtkedType:AtkedType.atked,path:"3040",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,
ap:50,cd:5,in:0,hit_num:1,hit:1,hitcd:1,speed:720,cost:10,with:90, ap:50,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:1,speed:720,cost:10,with:90,
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害" buffs:[],debuffs:[],info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"
}, },
6109: { 6109: {
uuid:6109,name:"冰刺",sp_name:"icez",AtkedType:AtkedType.atked,path:"3049",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6109,name:"冰刺",sp_name:"icez",AtkedType:AtkedType.atked,path:"3049",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,
ap:300,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:300,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人" buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"
}, },
6110: { 6110: {
uuid:6110,name:"潮汐",sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6110,name:"潮汐",sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人" buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"
}, },
6111: { 6111: {
uuid:6111,name:"陨石术",sp_name:"max_yunshi",AtkedType:AtkedType.fire,path:"3123",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6111,name:"陨石术",sp_name:"max_yunshi",AtkedType:AtkedType.fire,path:"3123",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,
ap:500,cd:5,in:0,hit_num:0,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:500,cd:5,in:0,t_num:1,hit_num:0,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害" buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
}, },
6112: { 6112: {
uuid:6112,name:"冰墙",sp_name:"icet",AtkedType:AtkedType.atked,path:"3050",TGroup:TGroup.Enemy,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6112,name:"冰墙",sp_name:"icet",AtkedType:AtkedType.atked,path:"3050",TGroup:TGroup.Enemy,SType:SType.damage,act:"max",DTType:DTType.range,
ap:400,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:400,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人" buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"
}, },
6113: { 6113: {
uuid:6113,name:"剑雨",sp_name:"max_jianyu",AtkedType:AtkedType.fire,path:"3123",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range, uuid:6113,name:"剑雨",sp_name:"max_jianyu",AtkedType:AtkedType.fire,path:"3123",TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,
ap:500,cd:5,in:0,hit_num:0,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:500,cd:5,in:0,t_num:1,hit_num:0,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害" buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
}, },
//召唤取消 //召唤取消
// 6031:{uuid:6031,name:"召唤骷髅",sp_name:"zhaohuan",AtkedType:AtkedType.atked,path:"3018", // 6031:{uuid:6031,name:"召唤骷髅",sp_name:"zhaohuan",AtkedType:AtkedType.atked,path:"3018",
// TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,fname:"max_blue",flash:true,with:90, // TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,fname:"max_blue",flash:true,with:90,
// debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:70,cd:60,in:0,hit_num:1,hit:1,hitcd:1,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"}, // debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:70,cd:60,in:0,t_num:1,hit_num:1,hit:1,hitcd:1,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"},
// ========== 超必杀 ========== 6200-6299 // ========== 超必杀 ========== 6200-6299
6201: { 6201: {
uuid:6201,name:"满天火雨",sp_name:"atk_fires",AtkedType:AtkedType.atked,path:"3101",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range, uuid:6201,name:"满天火雨",sp_name:"atk_fires",AtkedType:AtkedType.atked,path:"3101",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,
ap:100,cd:5,in:2,hit_num:1,hit:5,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:2,t_num:1,hit_num:1,hit:5,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害" buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
}, },
6202: { 6202: {
uuid:6202,name:"龙卷风爆",sp_name:"bwind",AtkedType:AtkedType.atked,path:"3069",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range, uuid:6202,name:"龙卷风爆",sp_name:"bwind",AtkedType:AtkedType.atked,path:"3069",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:1,speed:360,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:1,speed:360,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人" buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"
}, },
6203: { 6203: {
uuid:6203,name:"大潮汐",sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range, uuid:6203,name:"大潮汐",sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人" buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"
}, },
// ==========增强型技能,被动技能,========== 6300-6399 // ==========增强型技能,被动技能,========== 6300-6399
6301: { 6301: {
uuid:6301,name:"攻击生命强化Ⅰ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single, uuid:6301,name:"攻击生命强化Ⅰ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[{buff:BuffAttr.AP,buV:20,buC:0,buR:100},{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"增加20%攻击力和生命值" buffs:[{buff:BuffAttr.AP,buV:20,buC:0,buR:100},{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"增加20%攻击力和生命值"
}, },
6302: { 6302: {
uuid:6302,name:"攻击生命强化Ⅱ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3093",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single, uuid:6302,name:"攻击生命强化Ⅱ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3093",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[{buff:BuffAttr.AP,buV:40,buC:0,buR:100},{buff:BuffAttr.HP,buV:40,buC:0,buR:100}],debuffs:[],info:"增加40%攻击力和生命值" buffs:[{buff:BuffAttr.AP,buV:40,buC:0,buR:100},{buff:BuffAttr.HP,buV:40,buC:0,buR:100}],debuffs:[],info:"增加40%攻击力和生命值"
}, },
6303: { 6303: {
uuid:6303,name:"攻击生命强化Ⅲ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single, uuid:6303,name:"攻击生命强化Ⅲ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[{buff:BuffAttr.AP,buV:60,buC:0,buR:100},{buff:BuffAttr.HP,buV:60,buC:0,buR:100}],debuffs:[],info:"增加60%攻击力和生命值" buffs:[{buff:BuffAttr.AP,buV:60,buC:0,buR:100},{buff:BuffAttr.HP,buV:60,buC:0,buR:100}],debuffs:[],info:"增加60%攻击力和生命值"
}, },
6304: { 6304: {
uuid:6304,name:"攻击生命强化Ⅳ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single, uuid:6304,name:"攻击生命强化Ⅳ",sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,
ap:100,cd:5,in:0,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90, ap:100,cd:5,in:0,t_num:1,hit_num:1,hit:1,hitcd:0.3,speed:720,cost:10,with:90,
buffs:[{buff:BuffAttr.AP,buV:80,buC:0,buR:100},{buff:BuffAttr.HP,buV:80,buC:0,buR:100}],debuffs:[],info:"增加80%攻击力和生命值" buffs:[{buff:BuffAttr.AP,buV:80,buC:0,buR:100},{buff:BuffAttr.HP,buV:80,buC:0,buR:100}],debuffs:[],info:"增加80%攻击力和生命值"
}, },

View File

@@ -1,266 +0,0 @@
import { QualitySet } from "./BoxSet";
import { BuffAttr } from "./SkillSet"
// 天赋配置接口
export interface TalentConfig {
uuid: number;
name: string;
path: string;
quality: QualitySet;
buffType: BuffAttr;
value: number;
info: string;
icon?: string;
}
/**
* 天赋buff类型配置表
* 加成设定最高品质紫色其他品质减20%
*
* | 序号 | 天赋名称 | 最高加成 | BuffAttr枚举 | 说明 |
* |------|-------------|-------------------|---------------------|-------------------|
* | 1 | 攻击强化 | +50% | BuffAttr.ATK | 攻击力百分比加成 |
* | 2 | 暴击强化 | +25% | BuffAttr.CRITICAL | 暴击率加成 |
* | 3 | 暴击伤害强化 | +50% | BuffAttr.CRITICAL_DMG| 暴击伤害加成 |
* | 4 | 闪避强化 | +15% | BuffAttr.DODGE | 闪避率加成 |
* | 5 | 多重攻击 | +1次,伤害减40% | BuffAttr.WFUNY| 攻击次数增加 |
* | 6 | 生命强化 | +100% | BuffAttr.HP | 生命值百分比加成 |
* | 7 | 免伤强化 | +15% | BuffAttr.DEF | 免伤百分比加成 |
* | 8 | 穿透强化 | +1层 | BuffAttr.PUNCTURE | 普通攻击穿透层数 |
* | 9 | 攻击加速 | +40% | BuffAttr.ATK_CD | 攻击速度加成 |
* | 10 | 技能加速 | +40% | BuffAttr.SKILL_CD | 技能冷却缩减 |
* | 11 | 冰冻强化 | +10% | BuffAttr.FROST_RATIO| 冰冻概率加成 |
* | 12 | 击退强化 | +10% | BuffAttr.KNOCKBACK | 击退概率加成 |
* | 13 | 击晕强化 | +10% | BuffAttr.STUN_RATIO | 击晕概率加成 |
* | 14 | 反伤强化 | +20% | BuffAttr.REFLECT | 反伤百分比加成 |
* | 15 | 吸血强化 | +20% | BuffAttr.LIFESTEAL | 吸血百分比加成 |
*/
export const TalentSlot = {
0:"tal1",
1:"tal2",
2:"tal3",
3:"tal4",
// 4:"tal5",
// 5:"tal6",
}
// 天赋列表配置
export const TalentList: { [key: number]: TalentConfig } = {
// ==================== 蓝色品质天赋 ====================
1001: {uuid:1001,name:"攻击强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.ATK,value:30,info:"攻击力+30%"},
1002: {uuid:1002,name:"暴击强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.CRITICAL,value:15,info:"暴击率+15%"},
1003: {uuid:1003,name:"暴击伤害强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.CRITICAL_DMG,value:30,info:"暴击伤害+30%"},
1004: {uuid:1004,name:"闪避强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.DODGE,value:9,info:"闪避率+9%"},
1005: {uuid:1005,name:"多重攻击",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.WFUNY,value:20,info:"额外攻击概率+10%"},
1006: {uuid:1006,name:"生命强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.HP,value:60,info:"生命值+60%"},
1007: {uuid:1007,name:"免伤强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.DEF,value:9,info:"免伤+9%"},
1008: {uuid:1008,name:"穿透强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.PUNCTURE,value:1,info:"普通攻击穿透+1"},
1009: {uuid:1009,name:"攻击加速",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.ATK_CD,value:24,info:"攻击速度+24%"},
1010: {uuid:1010,name:"技能加速",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.SKILL_CD,value:24,info:"技能冷却缩减+24%"},
1011: {uuid:1011,name:"冰冻强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.FROST_RATIO,value:6,info:"冰冻概率+6%"},
1012: {uuid:1012,name:"击退强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.KNOCKBACK,value:6,info:"击退概率+6%"},
1013: {uuid:1013,name:"击晕强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.STUN_RATIO,value:6,info:"击晕概率+6%"},
1014: {uuid:1015,name:"吸血强化",path:"3063",quality:QualitySet.BLUE,buffType:BuffAttr.LIFESTEAL,value:12,info:"吸血+12%"},
// ==================== 紫色品质天赋 ====================
2001: {uuid:2001,name:"攻击大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.ATK,value:50,info:"攻击力+50%"},
2002: {uuid:2002,name:"暴击大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.CRITICAL,value:25,info:"暴击率+25%"},
2003: {uuid:2003,name:"暴击伤害大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.CRITICAL_DMG,value:50,info:"暴击伤害+50%"},
2004: {uuid:2004,name:"闪避大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.DODGE,value:15,info:"闪避率+15%"},
2005: {uuid:2005,name:"多重攻击大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.WFUNY,value:30,info:"额外攻击概率+30%"},
2006: {uuid:2006,name:"生命大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.HP,value:100,info:"生命值+100%"},
2007: {uuid:2007,name:"免伤大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.DEF,value:15,info:"免伤+15%"},
2008: {uuid:2008,name:"穿透大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.PUNCTURE,value:1,info:"普通攻击穿透+1"},
2009: {uuid:2009,name:"攻击加速大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.ATK_CD,value:40,info:"攻击速度+40%"},
2010: {uuid:2010,name:"技能加速大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.SKILL_CD,value:40,info:"技能冷却缩减+40%"},
2011: {uuid:2011,name:"冰冻大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.FROST_RATIO,value:10,info:"冰冻概率+10%"},
2012: {uuid:2012,name:"击退大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.KNOCKBACK,value:10,info:"击退概率+10%"},
2013: {uuid:2013,name:"击晕大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.STUN_RATIO,value:10,info:"击晕概率+10%"},
2014: {uuid:2015,name:"吸血大师",path:"3063",quality:QualitySet.PURPLE,buffType:BuffAttr.LIFESTEAL,value:20,info:"吸血+20%"},
};
// 获取天赋配置
export const getTalentConfig = (uuid: number): TalentConfig | null => {
return TalentList[uuid] || null;
};
// 获取指定品质的所有天赋
export const getTalentsByQuality = (quality: QualitySet): TalentConfig[] => {
return Object.values(TalentList).filter(talent => talent.quality === quality);
};
// 获取指定BuffAttr类型的所有天赋
export const getTalentsByBuffType = (buffType: BuffAttr): TalentConfig[] => {
return Object.values(TalentList).filter(talent => talent.buffType === buffType);
};
// 获取所有蓝色品质天赋
export const getBlueTalents = (): TalentConfig[] => {
return getTalentsByQuality(QualitySet.BLUE);
};
// 获取所有紫色品质天赋
export const getPurpleTalents = (): TalentConfig[] => {
return getTalentsByQuality(QualitySet.PURPLE);
};
// 天赋流派配置
export const TalentBuilds = {
// 攻击系流派
HIGH_ATK_SPEED: {
name: "高攻高速流",
description: "4个高攻 + 2个高攻速",
talents: [1001, 1001, 1001, 1001, 1009, 1009],
blueTalents: [1001, 1001, 1001, 1001, 1009, 1009],
purpleTalents: [2001, 2001, 2001, 2001, 2009, 2009]
},
HIGH_ATK_CRIT: {
name: "高攻高暴击流",
description: "4个高攻 + 2个高暴击",
talents: [1001, 1001, 1001, 1001, 1002, 1002],
blueTalents: [1001, 1001, 1001, 1001, 1002, 1002],
purpleTalents: [2001, 2001, 2001, 2001, 2002, 2002]
},
CRIT_BUILD: {
name: "暴击流",
description: "4个暴击 + 2个暴击加成 (100%暴击率)",
talents: [1002, 1002, 1002, 1002, 1003, 1003],
blueTalents: [1002, 1002, 1002, 1002, 1003, 1003],
purpleTalents: [2002, 2002, 2002, 2002, 2003, 2003]
},
MULTI_ATTACK: {
name: "多段攻击流",
description: "4个攻击次数+1 + 2个攻击加速 (高频低伤)",
talents: [1005, 1005, 1005, 1005, 1009, 1009],
blueTalents: [1005, 1005, 1005, 1005, 1009, 1009],
purpleTalents: [2005, 2005, 2005, 2005, 2009, 2009]
},
// 防御系流派
TANK_BUILD: {
name: "坦克流",
description: "4个HP + 2个免伤 (超高生存)",
talents: [1006, 1006, 1006, 1006, 1007, 1007],
blueTalents: [1006, 1006, 1006, 1006, 1007, 1007],
purpleTalents: [2006, 2006, 2006, 2006, 2007, 2007]
},
DODGE_BUILD: {
name: "闪避流",
description: "4个闪避 + 2个HP (60%闪避率)",
talents: [1004, 1004, 1004, 1004, 1006, 1006],
blueTalents: [1004, 1004, 1004, 1004, 1006, 1006],
purpleTalents: [2004, 2004, 2004, 2004, 2006, 2006]
},
REFLECT_BUILD: {
name: "反伤流",
description: "4个反伤 + 2个HP (80%反伤)",
talents: [1014, 1014, 1014, 1014, 1006, 1006],
blueTalents: [1014, 1014, 1014, 1014, 1006, 1006],
purpleTalents: [2014, 2014, 2014, 2014, 2006, 2006]
},
LIFESTEAL_BUILD: {
name: "吸血流",
description: "4个吸血 + 2个攻击 (80%吸血)",
talents: [1015, 1015, 1015, 1015, 1001, 1001],
blueTalents: [1015, 1015, 1015, 1015, 1001, 1001],
purpleTalents: [2015, 2015, 2015, 2015, 2001, 2001]
},
// 控制系流派
FROST_CONTROL: {
name: "冰冻控制流",
description: "4个冰冻概率 + 2个技能加速 (40%冰冻率)",
talents: [1011, 1011, 1011, 1011, 1010, 1010],
blueTalents: [1011, 1011, 1011, 1011, 1010, 1010],
purpleTalents: [2011, 2011, 2011, 2011, 2010, 2010]
},
KNOCKBACK_CONTROL: {
name: "击退控制流",
description: "4个击退概率 + 2个攻击加速 (40%击退率)",
talents: [1012, 1012, 1012, 1012, 1009, 1009],
blueTalents: [1012, 1012, 1012, 1012, 1009, 1009],
purpleTalents: [2012, 2012, 2012, 2012, 2009, 2009]
},
STUN_CONTROL: {
name: "击晕控制流",
description: "4个击晕概率 + 2个攻击 (40%击晕率)",
talents: [1013, 1013, 1013, 1013, 1001, 1001],
blueTalents: [1013, 1013, 1013, 1013, 1001, 1001],
purpleTalents: [2013, 2013, 2013, 2013, 2001, 2001]
},
// 技能系流派
SKILL_BUILD: {
name: "技能流",
description: "4个技能加速 + 2个攻击 (160%技能加速)",
talents: [1010, 1010, 1010, 1010, 1001, 1001],
blueTalents: [1010, 1010, 1010, 1010, 1001, 1001],
purpleTalents: [2010, 2010, 2010, 2010, 2001, 2001]
},
// 混合流派
BALANCED_BUILD: {
name: "攻防平衡流",
description: "2个攻击 + 2个HP + 2个免伤",
talents: [1001, 1001, 1006, 1006, 1007, 1007],
blueTalents: [1001, 1001, 1006, 1006, 1007, 1007],
purpleTalents: [2001, 2001, 2006, 2006, 2007, 2007]
},
SPEED_BUILD: {
name: "速度流",
description: "4个攻击加速 + 2个技能加速 (全方位加速)",
talents: [1009, 1009, 1009, 1009, 1010, 1010],
blueTalents: [1009, 1009, 1009, 1009, 1010, 1010],
purpleTalents: [2009, 2009, 2009, 2009, 2010, 2010]
},
PENETRATION_CRIT: {
name: "穿透暴击流",
description: "2个穿透 + 2个暴击 + 2个暴击加成",
talents: [1008, 1008, 1002, 1002, 1003, 1003],
blueTalents: [1008, 1008, 1002, 1002, 1003, 1003],
purpleTalents: [2008, 2008, 2002, 2002, 2003, 2003]
},
SURVIVAL_DPS: {
name: "生存输出流",
description: "2个攻击 + 2个吸血 + 2个闪避",
talents: [1001, 1001, 1015, 1015, 1004, 1004],
blueTalents: [1001, 1001, 1015, 1015, 1004, 1004],
purpleTalents: [2001, 2001, 2015, 2015, 2004, 2004]
}
};
// 获取推荐天赋流派
export const getRecommendedBuilds = () => {
return Object.values(TalentBuilds);
};
// 获取指定流派的天赋配置
export const getBuildTalents = (buildName: string): number[] => {
const build = TalentBuilds[buildName as keyof typeof TalentBuilds];
return build ? build.talents : [];
};
// 天赋系统配置
export const TalentSystemConfig = {
maxTalents: 6, // 玩家最多拥有6个天赋
blueQualityMultiplier: 0.6, // 蓝色品质为基础值的60%降低40%
purpleQualityMultiplier: 1.0, // 紫色品质为基础值(最高品质)
talentCost: {
[QualitySet.BLUE]: 1, // 蓝色天赋消耗1点
[QualitySet.PURPLE]: 2 // 紫色天赋消耗2点
}
};

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "5fdc5c44-f438-4c0e-8c5c-a2673d49aafd",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,7 +1,6 @@
import { v3 } from "cc" import { v3 } from "cc"
import { FacSet, QualitySet } from "./BoxSet" import { FacSet, QualitySet } from "./BoxSet"
import { smc } from "../SingletonModuleComp" import { smc } from "../SingletonModuleComp"
import { Items } from "./Items"
/** /**
* kind 1:烈焰 2:寒冰 3:自然 4:暗影 5:神圣 * kind 1:烈焰 2:寒冰 3:自然 4:暗影 5:神圣
**/ **/
@@ -47,28 +46,18 @@ export const HTypeName ={
* 紫色:金钥匙*100 item:1008 num:100 * 紫色:金钥匙*100 item:1008 num:100
* 橙色:金钥匙*100 item:1009 num:100 * 橙色:金钥匙*100 item:1009 num:100
*/ */
export const unlockHeroCost={
[QualitySet.GREEN]:{i_uuid:Items[1006].uuid,num:1},
[QualitySet.BLUE]:{i_uuid:Items[1006].uuid,num:1},
[QualitySet.PURPLE]:{i_uuid:Items[1007].uuid,num:1},
[QualitySet.ORANGE]:{i_uuid:Items[1008].uuid,num:1},
}
//fac:FacSet.HERO //fac:FacSet.HERO
export const getHeroList = (quality:number=0)=>{ export const getHeroList = (quality:number=0)=>{
const filteredHeros = Object.values(HeroInfo).filter(item=>{ const filteredHeros = Object.values(HeroInfo).filter(item=>{
const facMatch = item.fac === FacSet.HERO; const facMatch = item.fac === FacSet.HERO;
const qualityMatch = quality === 0 || item.quality === quality; return facMatch;
return facMatch && qualityMatch;
}); });
// 分离拥有和未拥有的英雄 // 分离拥有和未拥有的英雄
const ownedHeros = filteredHeros.filter(item => smc.heros[item.uuid]); const ownedHeros = filteredHeros.filter(item => smc.heros[item.uuid]);
const unownedHeros = filteredHeros.filter(item => !smc.heros[item.uuid]); const unownedHeros = filteredHeros.filter(item => !smc.heros[item.uuid]);
// 分别按品质排序(品质高的在前)
ownedHeros.sort((a,b) => b.quality - a.quality);
unownedHeros.sort((a,b) => b.quality - a.quality);
// 合并列表:拥有的在前,未拥有的在后 // 合并列表:拥有的在前,未拥有的在后
return [...ownedHeros, ...unownedHeros].map(item => item.uuid); return [...ownedHeros, ...unownedHeros].map(item => item.uuid);
} }
@@ -76,8 +65,7 @@ export const getHeroList = (quality:number=0)=>{
export const getMonList = (quality:number=0)=>{ export const getMonList = (quality:number=0)=>{
return Object.values(HeroInfo).filter(item=>{ return Object.values(HeroInfo).filter(item=>{
const facMatch = item.fac === FacSet.MON; const facMatch = item.fac === FacSet.MON;
const qualityMatch = quality === 0 || item.quality === quality; return facMatch ;
return facMatch && qualityMatch;
}).map(item=>item.uuid) }).map(item=>item.uuid)
} }
@@ -98,107 +86,115 @@ export const MonSet = {
} }
export enum HeroUpSet {
MP=5,
HP=10,
LVMP=100,
LVHP=100,
LVATK=10,
LVDEF=5,
}
export const HeroInfo = { export const HeroInfo = {
//主将 //主将
5001:{uuid:5001,name:"火焰骑士",path:"hk1", fac:FacSet.HERO, quality:QualitySet.GREEN,lv:1,kind:1, 5001:{uuid:5001,name:"火焰骑士",path:"hk1", fac:FacSet.HERO, kind:1,
type:HType.warrior,hp:100,mp:100,def:5,ap:15,dis:100,cd:1,speed:150,skills:[6001,6001], type:HType.warrior,hp:100,mp:100,def:5,ap:15,dis:100,cd:1,speed:150,skills:[6001,6001],
buff:[],info:""}, buff:[],info:""},
5002:{uuid:5002,name:"刺客",path:"hc1", fac:FacSet.HERO, quality:QualitySet.BLUE,lv:1,kind:1, 5002:{uuid:5002,name:"刺客",path:"hc1", fac:FacSet.HERO, kind:1,
type:HType.warrior,hp:100,mp:100,def:5,ap:15,dis:100,cd:1,speed:150,skills:[6001,6001], type:HType.warrior,hp:100,mp:100,def:5,ap:15,dis:100,cd:1,speed:150,skills:[6001,6001],
buff:[],info:""}, buff:[],info:""},
5005:{uuid:5005,name:"绿箭",path:"ha1", fac:FacSet.HERO, quality:QualitySet.BLUE,lv:1,kind:2, 5005:{uuid:5005,name:"绿箭",path:"ha1", fac:FacSet.HERO, kind:2,
type:HType.remote,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6001,6001], type:HType.remote,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6001,6001],
buff:[],info:""}, buff:[],info:""},
5007:{uuid:5007,name:"牧师",path:"hmh1", fac:FacSet.HERO, quality:QualitySet.PURPLE,lv:1,kind:2, 5007:{uuid:5007,name:"牧师",path:"hmh1", fac:FacSet.HERO, kind:2,
type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6001,6001], type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6001,6001],
buff:[],info:""}, buff:[],info:""},
5008:{uuid:5008,name:"火女",path:"hmf1", fac:FacSet.HERO, quality:QualitySet.BLUE,lv:1,kind:2, 5008:{uuid:5008,name:"火女",path:"hmf1", fac:FacSet.HERO, kind:2,
type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6001,6001], type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6001,6001],
buff:[],info:""}, buff:[],info:""},
// 5009:{uuid:5009,name:"风暴精灵",path:"hk1", fac:FacSet.HERO, quality:QualitySet.BLUE,lv:1,kind:2, // 5009:{uuid:5009,name:"风暴精灵",path:"hk1", fac:FacSet.HERO, kind:2,
// type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6006,6006,6301,6302,6303], // type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6006,6006,6301,6302,6303],
// buff:[],info:""}, // buff:[],info:""},
// 5010:{uuid:5010,name:"战争祭祀",path:"hk1", fac:FacSet.HERO, quality:QualitySet.ORANGE,lv:1,kind:2, // 5010:{uuid:5010,name:"战争祭祀",path:"hk1", fac:FacSet.HERO, kind:2,
// type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6007,6007,6301,6302,6303], // type:HType.mage,hp:100,mp:100,def:5,ap:15,dis:400,cd:1.5,speed:100,skills:[6007,6007,6301,6302,6303],
// buff:[],info:""}, // buff:[],info:""},
// 5011:{uuid:5011,name:"ha2",path:"ha2", fac:FacSet.HERO, quality:QualitySet.BLUE,lv:1,kind:2, // 5011:{uuid:5011,name:"ha2",path:"ha2", fac:FacSet.HERO, kind:2,
// type:HType.remote,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6003,6003,6301,6302,6303], // type:HType.remote,hp:100,mp:100,def:5,ap:15,dis:400,cd:1,speed:100,skills:[6003,6003,6301,6302,6303],
// buff:[],info:""}, // buff:[],info:""},
//怪物 //怪物
5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5202:{uuid:5202,name:"兽人刺客",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5202:{uuid:5202,name:"兽人刺客",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1,speed:100,skills:[6001,6001], type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5203:{uuid:5203,name:"兽人护卫",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5203:{uuid:5203,name:"兽人护卫",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5204:{uuid:5204,name:"石卫", path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5204:{uuid:5204,name:"石卫", path:"mo1", fac:FacSet.MON, kind:1,
type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001], type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001],
buff:[],info:"法师怪物-高伤害脆弱"}, buff:[],info:"法师怪物-高伤害脆弱"},
5205:{uuid:5205,name:"土卫", path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5205:{uuid:5205,name:"土卫", path:"mo1", fac:FacSet.MON, kind:1,
type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001], type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001],
buff:[],info:"法师怪物-高伤害脆弱"}, buff:[],info:"法师怪物-高伤害脆弱"},
5206:{uuid:5206,name:"树卫", path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5206:{uuid:5206,name:"树卫", path:"mo1", fac:FacSet.MON, kind:1,
type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001], type:HType.mage,hp:18,mp:100,def:5,ap:5,dis:90,cd:2.5,speed:100,skills:[6001,6001],
buff:[],info:"法师怪物-高伤害脆弱"}, buff:[],info:"法师怪物-高伤害脆弱"},
5219:{uuid:5219,name:"牛头战士",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:2,kind:1, 5219:{uuid:5219,name:"牛头战士",path:"mo1", fac:FacSet.MON, lv:2,kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5220:{uuid:5220,name:"牛头战士",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5220:{uuid:5220,name:"牛头战士",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5221:{uuid:5221,name:"牛头战士",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5221:{uuid:5221,name:"牛头战士",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1.5,speed:100,skills:[6001,6001], type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1.5,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5222:{uuid:5222,name:"独眼巨人",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5222:{uuid:5222,name:"独眼巨人",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5223:{uuid:5223,name:"独眼巨人",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5223:{uuid:5223,name:"独眼巨人",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:25,mp:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5224:{uuid:5224,name:"独眼巨人",path:"mo1", fac:FacSet.MON, quality:QualitySet.GREEN,lv:1,kind:1, 5224:{uuid:5224,name:"独眼巨人",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1.5,speed:100,skills:[6001,6001], type:HType.remote,hp:20,mp:100,def:5,ap:5,dis:350,cd:1.5,speed:100,skills:[6001,6001],
buff:[],info:"普通怪物-战士型"}, buff:[],info:"普通怪物-战士型"},
5225:{uuid:5225,name:"精英独眼",path:"mo1", fac:FacSet.MON, quality:QualitySet.BLUE,lv:1,kind:1, 5225:{uuid:5225,name:"精英独眼",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001], type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001],
buff:[],info:"精英怪物-战士型"}, buff:[],info:"精英怪物-战士型"},
5226:{uuid:5226,name:"精英牛头",path:"mo1", fac:FacSet.MON, quality:QualitySet.BLUE,lv:1,kind:1, 5226:{uuid:5226,name:"精英牛头",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"精英怪物-战士型"}, buff:[],info:"精英怪物-战士型"},
5227:{uuid:5227,name:"精英兽人",path:"mo1", fac:FacSet.MON, quality:QualitySet.BLUE,lv:1,kind:1, 5227:{uuid:5227,name:"精英兽人",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001,6001], type:HType.warrior,hp:45,mp:100,def:5,ap:12,dis:300,cd:2,speed:100,skills:[6001,6001],
buff:[],info:"精英怪物-战士型"}, buff:[],info:"精英怪物-战士型"},

View File

@@ -3,9 +3,6 @@ import { BattleMoveComp } from "./BattleMoveComp";
import { ecs } from "../../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { smc } from "../../SingletonModuleComp"; import { smc } from "../../SingletonModuleComp";
import { FacSet } from "../../config/BoxSet"; import { FacSet } from "../../config/BoxSet";
import { oops } from "db://oops-framework/core/Oops";
import { GameEvent } from "../../config/GameEvent";
import { FightSet } from "../../config/Mission";
import { HType } from "../../config/heroSet"; import { HType } from "../../config/heroSet";
@ecs.register('BattleMoveSystem') @ecs.register('BattleMoveSystem')

View File

@@ -8,9 +8,6 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet"; import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp"; import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { BuffAttr, getBuffNum, SkillSet, SType } from "../common/config/SkillSet";
import { FightSet } from "../common/config/Mission";
import { Skill } from "../skills/Skill";
/** 角色实体 */ /** 角色实体 */
@ecs.register(`Hero`) @ecs.register(`Hero`)
@@ -73,31 +70,32 @@ export class Hero extends ecs.Entity {
hv.box_group = BoxSet.HERO; hv.box_group = BoxSet.HERO;
hv.hero_uuid= uuid; hv.hero_uuid= uuid;
hv.hero_name= hero.name; hv.hero_name= hero.name;
hv.Attrs=getBuffNum() hv.hp=hv.hp_max=hv.hp_base=HeroInfo[uuid].hp;
hv.Attrs[BuffAttr.SPEED]=hv.speed = hero.speed; hv.mp=hv.mp_max=hv.mp_base=HeroInfo[uuid].mp;
hv.Attrs[BuffAttr.DIS]=hv.dis=hero.dis; // hv.Attrs=getBuffNum()
hv.Attrs[BuffAttr.ATK_CD]=hv.cd=hero.cd // hv.Attrs[BuffAttr.SPEED]=hv.speed = hero.speed;
hv.Attrs[BuffAttr.HP_MAX]=hv.hp=hv.hp_max=HeroInfo[uuid].hp; // hv.Attrs[BuffAttr.DIS]=hv.dis=hero.dis;
hv.Attrs[BuffAttr.AP]=hv.ap=HeroInfo[uuid].ap; // hv.Attrs[BuffAttr.ATK_CD]=hv.cd=hero.cd
hv.Attrs[BuffAttr.DEF]=HeroInfo[uuid].def; // hv.Attrs[BuffAttr.AP]=hv.ap=HeroInfo[uuid].ap;
hero.buff.forEach((buff:any)=>{ // hv.Attrs[BuffAttr.DEF]=HeroInfo[uuid].def;
hv.apply_buff(buff.type,buff.value) // hero.buff.forEach((buff:any)=>{
}) // hv.apply_buff(buff.type,buff.value)
for(let i=0;i<hero.skills.length;i++){ // })
if(SkillSet[hero.skills[i]].SType==SType.buff){ // for(let i=0;i<hero.skills.length;i++){
let buffs=SkillSet[hero.skills[i]].buffs // if(SkillSet[hero.skills[i]].SType==SType.buff){
buffs.forEach((buff:any)=>{ // let buffs=SkillSet[hero.skills[i]].buffs
hv.apply_buff(buff.buff, buff.buV) // buffs.forEach((buff:any)=>{
}) // hv.apply_buff(buff.buff, buff.buV)
continue // })
}else{ // continue
hv.skills.push({ // }else{
cd:0, // hv.skills.push({
uuid:hero.skills[i], // cd:0,
cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd // uuid:hero.skills[i],
}) // cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd
} // })
} // }
// }
return hv return hv
} }
} }

View File

@@ -1,9 +1,7 @@
import { _decorator } from "cc"; import { _decorator } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { GameEvent } from "../common/config/GameEvent";
import { HeroViewComp } from "./HeroViewComp"; import { HeroViewComp } from "./HeroViewComp";
import { BuffAttr } from "../common/config/SkillSet";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;

View File

@@ -11,8 +11,7 @@ import { oops } from "db://oops-framework/core/Oops";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { FightSet, getExpDrops, getStoneDrops, TooltipTypes } from "../common/config/Mission"; import { FightSet, getExpDrops, getStoneDrops, TooltipTypes } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager"; import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { Items, MonsterDropManager } from "../common/config/Items"; import { HeroInfo, HeroUpSet } from "../common/config/heroSet";
import { HeroInfo } from "../common/config/heroSet";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -45,9 +44,12 @@ export class HeroViewComp extends CCComp {
speed_base: number = 100; /** 角色初始速度 */ speed_base: number = 100; /** 角色初始速度 */
power:number=0; power:number=0;
power_max:number=100; power_max:number=100;
mp: number = 0;
mp_max: number = 100;
mp_base: number = 100;
hp: number = 100; /** 血量 */ hp: number = 100; /** 血量 */
hp_max: number = 100; /** 最大血量 */ hp_max: number = 100; /** 最大血量 */
hp_base:number=0; hp_base:number=100; /** 基础最大血量 */
shield:number=0; //当前护甲值 shield:number=0; //当前护甲值
shield_max:number=0; //最大护甲值 shield_max:number=0; //最大护甲值
ap: number = 10; /**攻击力 */ ap: number = 10; /**攻击力 */
@@ -152,14 +154,13 @@ export class HeroViewComp extends CCComp {
// this.ent.destroy(); // this.ent.destroy();
// return // return
// } // }
this.BaseUp(dt)
if(this.DEBUFF_FROST > 0){ if(this.DEBUFF_FROST > 0){
this.DEBUFF_FROST -=dt; this.DEBUFF_FROST -=dt;
} }
if(this.DEBUFF_STUN > 0){ if(this.DEBUFF_STUN > 0){
this.DEBUFF_STUN -=dt; this.DEBUFF_STUN -=dt;
} }
// 更新所有按时间减少的buff和debuff // 更新所有按时间减少的buff和debuff
this.updateBuffsAndDebuffs(dt); this.updateBuffsAndDebuffs(dt);
this.in_stop(dt); this.in_stop(dt);
@@ -167,6 +168,12 @@ export class HeroViewComp extends CCComp {
this.processDamageQueue(); this.processDamageQueue();
} }
BaseUp(dt:number){
this.mp += HeroUpSet.MP*dt
this.hp += HeroUpSet.HP*dt
if(this.mp > this.mp_max) this.mp = this.mp_max
if(this.hp > this.hp_max) this.hp = this.hp_max
}
do_fight_end(){ do_fight_end(){
this.as.do_buff() this.as.do_buff()
} }
@@ -202,7 +209,7 @@ export class HeroViewComp extends CCComp {
add_hp(hp: number = 0,is_num:boolean=true) { add_hp(hp: number = 0,is_num:boolean=true) {
this.BUFFCOMP.heathed(); this.BUFFCOMP.heathed();
let real_hp=0 let real_hp=0
let hp_max=this.Attrs[BuffAttr.HP_MAX] let hp_max=this.hp_max
let lost_hp=hp_max-this.hp let lost_hp=hp_max-this.hp
if(is_num){ if(is_num){
if(lost_hp > hp){ if(lost_hp > hp){
@@ -221,7 +228,7 @@ export class HeroViewComp extends CCComp {
this.hp+=real_hp; this.hp+=real_hp;
this.BUFFCOMP.tooltip(TooltipTypes.health,real_hp.toFixed(0)); this.BUFFCOMP.tooltip(TooltipTypes.health,real_hp.toFixed(0));
} }
this.BUFFCOMP.hp_show(this.hp,this.Attrs[BuffAttr.HP_MAX]) this.BUFFCOMP.hp_show(this.hp,this.hp_max)
// this.update_vm // this.update_vm
} }
@@ -269,30 +276,7 @@ export class HeroViewComp extends CCComp {
} }
do_drop(){ do_drop(){
let drop_item=MonsterDropManager.calculateMonsterDrops(this.hero_uuid,smc.data.mission,1)
this.scheduleOnce(()=>{
if(smc.guides[2]==0&&smc.current_guide==2&&smc.guides[1]==1) {
drop_item.push({item_uuid:Items[1008].uuid,count:20})
}
},0.1)
let {exp,gold,diamond}=MonsterDropManager.calculateBaseResourceDrops(HeroInfo[this.hero_uuid].quality,smc.data.mission,this.BUFFS.length)
oops.message.dispatchEvent(GameEvent.MonDead,{mon_uuid:this.hero_uuid,drops:drop_item,game_data:{exp:exp, gold:gold, diamond:diamond}})
if(drop_item.length>0){
for(let i=0;i<drop_item.length;i++){
let d_item=drop_item[i]
smc.addItem(d_item.item_uuid,d_item.count)
}
}
if(exp>0){
smc.addExp(exp)
}
if(gold>0){
smc.addGold(gold)
}
if(diamond>0){
smc.addDiamond(diamond)
}
// console.log("[HeroViewComp]:do_drop",this.hero_uuid,drop_item,exp,gold,diamond)
} }
add_debuff(type:number,deV:number,deC:number,deR:number){ add_debuff(type:number,deV:number,deC:number,deR:number){
let n_deR=deR-this.Attrs[BuffAttr.DEBUFF_DOWN] let n_deR=deR-this.Attrs[BuffAttr.DEBUFF_DOWN]
@@ -325,8 +309,9 @@ export class HeroViewComp extends CCComp {
// this.is_stop=true // this.is_stop=true
break break
case DebuffAttr.DEHP: case DebuffAttr.DEHP:
this.Attrs[BuffAttr.HP_MAX]-=deV/100*this.Attrs[BuffAttr.HP_MAX] this.Attrs[BuffAttr.HP_MAX]-=deV
if(this.hp-this.Attrs[BuffAttr.HP_MAX]>0) this.hp=this.Attrs[BuffAttr.HP_MAX] this.hp_max=Math.floor(this.hp_base*(100+this.Attrs[BuffAttr.HP_MAX]))
if(this.hp-this.hp_max>0) this.hp=this.hp_max
break break
case DebuffAttr.DEATK: //99为具体数字 并且局内永久生效,其他为百分比 case DebuffAttr.DEATK: //99为具体数字 并且局内永久生效,其他为百分比
if(deC == 99){ if(deC == 99){
@@ -409,8 +394,10 @@ export class HeroViewComp extends CCComp {
case BuffAttr.ATK_CD: //攻击速度百分比 case BuffAttr.ATK_CD: //攻击速度百分比
this.Attrs[BuffAttr.ATK_CD]+=buff_value/100*this.cd this.Attrs[BuffAttr.ATK_CD]+=buff_value/100*this.cd
break break
case BuffAttr.HP: //血量百分比 case BuffAttr.HP_MAX: //血量百分比
this.Attrs[BuffAttr.HP_MAX]+=Math.floor(buff_value/100*this.hp_max) this.Attrs[BuffAttr.HP_MAX]+=buff_value
this.hp_max=Math.floor(this.hp_base*(100+this.Attrs[BuffAttr.HP_MAX]))
if(this.hp-this.hp_max>0) this.hp=this.hp_max
break break
default: default:
this.Attrs[buff_type]+=buff_value this.Attrs[buff_type]+=buff_value

View File

@@ -1,17 +1,13 @@
import { _decorator, Component, Node, ProgressBar, v3, Vec3 } from 'cc'; import { _decorator, Component, Node, ProgressBar, v3, Vec3 } from 'cc';
import { HeroViewComp } from './HeroViewComp'; import { HeroViewComp } from './HeroViewComp';
import { BuffAttr,SKILL_CONST, SkillSet, SType, TGroup, } from '../common/config/SkillSet'; import { BuffAttr,SKILL_CONST, SkillSet, SType, TGroup, } from '../common/config/SkillSet';
import { Skill } from '../skills/Skill';
import { ecs } from 'db://oops-framework/libs/ecs/ECS'; import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { oops } from 'db://oops-framework/core/Oops';
import { GameEvent } from '../common/config/GameEvent'; import { GameEvent } from '../common/config/GameEvent';
import { BoxSet, FacSet } from '../common/config/BoxSet'; import { FacSet } from '../common/config/BoxSet';
import { smc } from '../common/SingletonModuleComp'; import { smc } from '../common/SingletonModuleComp';
import { CCComp } from 'db://oops-framework/module/common/CCComp'; import { CCComp } from 'db://oops-framework/module/common/CCComp';
import { MonModelComp } from './MonModelComp'; import { MonModelComp } from './MonModelComp';
import { HeroModelComp } from './HeroModelComp'; import { HeroModelComp } from './HeroModelComp';
import { FightSet } from '../common/config/Mission';
import { Timer } from 'db://oops-framework/core/common/timer/Timer';
import { SkillEnt } from '../skill/SkillEnt'; import { SkillEnt } from '../skill/SkillEnt';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -28,7 +24,6 @@ export class SkillConComp extends CCComp {
onLoad(){ onLoad(){
this.HeroView=this.node.getComponent(HeroViewComp) this.HeroView=this.node.getComponent(HeroViewComp)
// //console.log(this.HeroView.uid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad") // //console.log(this.HeroView.uid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad")
} }
start() { start() {
// //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start") // //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start")
@@ -42,28 +37,16 @@ export class SkillConComp extends CCComp {
let skills=this.HeroView.skills let skills=this.HeroView.skills
for(let i=0;i<skills.length;i++){ for(let i=0;i<skills.length;i++){
skills[i].cd += dt; skills[i].cd += dt;
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){ if(skills[i].cd > skills[i].cd_max&&this.HeroView.mp >= skills[i].cost){
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){ if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
this.castSkill(SkillSet[skills[i].uuid]) this.castSkill(SkillSet[skills[i].uuid])
this.HeroView.skills[i].cd = 0 this.HeroView.skills[i].cd = 0
this.HeroView.mp -= skills[i].cost
} }
} }
} }
if(skills[1]){
if(this.HeroView.fac==FacSet.HERO) {
// 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
this.HeroView.node.getChildByName("top").getChildByName("pow").getComponent(ProgressBar).progress=progress
if(this.HeroView.power>this.HeroView.power_max){
this.HeroView.power=0
}
}else{
if(this.HeroView.fac==FacSet.HERO) {
}
}
} }
} }
@@ -83,29 +66,15 @@ export class SkillConComp extends CCComp {
if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) { if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) {
return; return;
} }
let target:any=null let targets:any=null
switch(config.TGroup){ if(config.TGroup==TGroup.Self){
case TGroup.Enemy: //单个敌人 targets = [this.node.position]
target = this.filterFrontRow() }
break if(config.TGroup==TGroup.Enemy){
case TGroup.Ally: //所有敌人 targets = this.selectTargets(config.t_num)
target = this.selectAllyTargets()
break
case TGroup.Self: //自身
target = this.node.position
break
case TGroup.Team: //所有友方
target = this.node.position
break
case TGroup.All: //所有单位
break
} }
this.HeroView.playSkillEffect(config.uuid) this.HeroView.playSkillEffect(config.uuid)
const sEnt = ecs.getEntity<SkillEnt>(SkillEnt); const sEnt = ecs.getEntity<SkillEnt>(SkillEnt);
const timerId = setTimeout(() => { const timerId = setTimeout(() => {
// 再次检查节点有效性 // 再次检查节点有效性
if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) { if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) {
@@ -113,10 +82,10 @@ export class SkillConComp extends CCComp {
} }
console.log("技能开始",sEnt) console.log("技能开始",sEnt)
sEnt.load( sEnt.load(
new Vec3(this.HeroView.node.position.x,this.HeroView.node.position.y,0), this.node.position,
this.node.parent, this.node.parent,
config.uuid, config.uuid,
[new Vec3(target.x, target.y, 0)], targets,
this.HeroView, this.HeroView,
dmg dmg
); );
@@ -153,72 +122,52 @@ export class SkillConComp extends CCComp {
let keyEntity = entities.find(e => e.get(HeroViewComp).node.position.x === keyPos); let keyEntity = entities.find(e => e.get(HeroViewComp).node.position.x === keyPos);
return keyEntity.get(HeroViewComp).node.position; return keyEntity.get(HeroViewComp).node.position;
} }
/** 筛选最前排单位 */ /**
private filterFrontRow(): Vec3{ * 选择目标(整合版)
* @param t_num 目标数量,第一个是最近的前排,后续随机(可重复)
// 敌方最前排是x坐标最大的我方最前排是x坐标最小的,若目标不存在,敌人 取400,我方取-400 * @returns 目标坐标数组
let pos=v3(0,0) */
let entities=this.check_target() private selectTargets(t_num: number): Vec3[] {
if(entities.length==0){ const targets: Vec3[] = [];
if(this.HeroView.fac==FacSet.HERO){ const entities = this.check_target();
return v3(400,0)
}else{ // 如果没有目标实体
return v3(-400,0) if (entities.length === 0) {
} const defaultPos = this.HeroView.fac === FacSet.HERO ? v3(400, 0, 0) : v3(-400, 0, 0);
} // 返回t_num个相同的默认位置
pos=v3(this.get_front(entities)) for (let i = 0; i < t_num; i++) {
return pos targets.push(defaultPos.clone());
}
private selectAllyTargets( ): Vec3 {
// 敌方最前排是x坐标最大的+50我方最前排是x坐标最小的+50,若目标不存在,敌人 取320/2,我方取-320/2
let kp=50
if(this.HeroView.fac==FacSet.MON) kp=0
let pos=v3(0,0)
let entities=this.check_target()
if(entities.length==0){
if(this.HeroView.fac==FacSet.HERO){
return v3(320/2+kp,0)
}else{
return v3(-320/2-kp,0)
} }
return targets;
} }
pos=v3(this.get_front(entities).x+kp,this.get_front(entities).y-BoxSet.ATK_Y,0)
return pos // 第一个目标:最前排(离施法者最近的)
} const frontPos = this.get_front(entities);
targets.push(v3(frontPos.x, frontPos.y, 0));
// 后续目标:随机选择(可以重复)
/** 随机选择目标 */ for (let i = 1; i < t_num; i++) {
private pickRandomTarget(count: number): ecs.Entity[] { const randomEntity = entities[Math.floor(Math.random() * entities.length)];
let entities:any=null const randomPos = randomEntity.get(HeroViewComp).node.position;
if(this.HeroView.fac==FacSet.HERO){ targets.push(v3(randomPos.x, randomPos.y, 0));
entities = ecs.query(ecs.allOf(MonModelComp))
}else{
entities = ecs.query(ecs.allOf(HeroModelComp))
} }
const shuffled = [...entities].sort(() => 0.5 - Math.random());
return shuffled.slice(0, count); return targets;
} }
public clear_timer() { public clear_timer() {
// console.log("[SkillConComp]:clear_timer",this.HeroView); // console.log("[SkillConComp]:clear_timer",this.HeroView);
Object.values(this._timers).forEach(clearTimeout); Object.values(this._timers).forEach(clearTimeout);
} }
get_count(count:number,view:HeroViewComp){ get_count(count:number,view:HeroViewComp){
let re=count+view.wfuny let re=count+view.wfuny
if(re<1) re=1 if(re<1) re=1
return re return re
} }
reset() { reset() {
this.clear_timer(); this.clear_timer();
} }
onDestroy() { onDestroy() {
// 清理所有定时器 // 清理所有定时器
// console.log("[SkillConComp]:onDestroy:",this.node.name) // console.log("[SkillConComp]:onDestroy:",this.node.name)

View File

@@ -2,8 +2,6 @@ import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { MissionHomeComp } from "./MissionHomeComp";
import { MissionComp } from "./MissionComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** 视图层对象 */ /** 视图层对象 */

View File

@@ -1,11 +1,7 @@
import { _decorator, Animation, AnimationClip, Component, Label, Node, resources, Sprite, SpriteFrame } from 'cc'; import { _decorator, Animation, AnimationClip, Component, Label, Node, resources, Sprite, SpriteFrame } from 'cc';
import { oops } from 'db://oops-framework/core/Oops'; import { oops } from 'db://oops-framework/core/Oops';
import { UIID } from '../common/config/GameUIConfig';
import { getHeroList, HeroInfo, HType, HTypeName } from '../common/config/heroSet'; import { getHeroList, HeroInfo, HType, HTypeName } from '../common/config/heroSet';
import { smc } from '../common/SingletonModuleComp'; import { smc } from '../common/SingletonModuleComp';
import { GameEvent } from '../common/config/GameEvent';
import { NumberFormatter } from '../common/config/BoxSet';
import { Items } from '../common/config/Items';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('HInfoComp') @ccclass('HInfoComp')

View File

@@ -4,13 +4,10 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { FightSet} from "../common/config/Mission"; import { FightSet} from "../common/config/Mission";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { HeroViewComp } from "../hero/HeroViewComp"; import { HeroViewComp } from "../hero/HeroViewComp";
import { MonModelComp } from "../hero/MonModelComp";
import { SkillCom } from "../skills/SkillCom"; import { SkillCom } from "../skills/SkillCom";
import { UIID } from "../common/config/GameUIConfig"; import { UIID } from "../common/config/GameUIConfig";
import { ItemComp } from "./ItemComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;

View File

@@ -5,12 +5,7 @@ import { Hero } from "../hero/Hero";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { Timer } from "db://oops-framework/core/common/timer/Timer"; import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { HeroModelComp } from "../hero/HeroModelComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { oops } from "db://oops-framework/core/Oops";
import { HeroPos } from "../common/config/heroSet"; import { HeroPos } from "../common/config/heroSet";
import { FightSet } from "../common/config/Mission";
import { QualitySet } from "../common/config/BoxSet";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** 视图层对象 */ /** 视图层对象 */

View File

@@ -3,12 +3,8 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { Monster } from "../hero/Mon"; import { Monster } from "../hero/Mon";
import { MonSet } from "../common/config/heroSet"; import { MonSet } from "../common/config/heroSet";
import { FightSet } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { oops } from "db://oops-framework/core/Oops";
// 导入肉鸽配置 // 导入肉鸽配置
import { import {
generateStageConfig, generateStageConfig,

View File

@@ -2,16 +2,11 @@ import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween,
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameEvent } from "../common/config/GameEvent"; import { GameEvent } from "../common/config/GameEvent";
import { AType, BuffAttr, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet"; import { AType, BuffAttr, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet";
import { BoxSet, FacSet } from "../common/config/BoxSet"; import { BoxSet, FacSet } from "../common/config/BoxSet";
import { HeroViewComp } from "../hero/HeroViewComp"; import { HeroViewComp } from "../hero/HeroViewComp";
import { BezierMove } from "../BezierMove/BezierMove"; import { BezierMove } from "../BezierMove/BezierMove";
import { MonModelComp } from "../hero/MonModelComp";
import { FightSet } from "../common/config/Mission";
import { HeroModelComp } from "../hero/HeroModelComp";
import { Skill } from "./Skill";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;

View File

@@ -1,9 +1,6 @@
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, Label,resources,SpriteFrame,Sprite} from "cc"; import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, Label,resources,SpriteFrame,Sprite} from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { SkillSet } from "../common/config/SkillSet"; import { SkillSet } from "../common/config/SkillSet";
import { TooltipTypes } from "../common/config/Mission"; import { TooltipTypes } from "../common/config/Mission";