技能设置清理
This commit is contained in:
@@ -1,172 +0,0 @@
|
||||
/*
|
||||
CardList type: 1:伙伴 2:技能 3:装备
|
||||
*/
|
||||
|
||||
import { getHeroList } from "./heroSet"
|
||||
import { BuffAttr, getSkills, HeroSkillList, SkillSet } from "./SkillSet"
|
||||
import { equip_list, weapons, armors, accessorys, getEquipUUIDsByType } from "./Equips"
|
||||
import { getEnhancement } from "./LevelUp"
|
||||
import { TalentList } from "./TalentSet"
|
||||
import { QualitySet } from "./BoxSet"
|
||||
|
||||
//1:伙伴 2:技能 3:装备的出现概率配置
|
||||
export const CardProbability={
|
||||
1:0.5,
|
||||
2:0.3,
|
||||
3:0.2,
|
||||
}
|
||||
export const cardType={
|
||||
HERO:1,
|
||||
SKILL:2,
|
||||
EQUIP:3,
|
||||
SPECIAL:4,
|
||||
ENHANCEMENT:5,
|
||||
TALENT:6,
|
||||
}
|
||||
// 获取随机卡牌UUID
|
||||
export function getRandomCardUUID(
|
||||
heroRate: number = 1, // 伙伴出现概率修正系数
|
||||
skillRate: number = 1, // 技能出现概率修正系数
|
||||
equipRate: number = 1, // 装备出现概率修正系数
|
||||
specialRate: number = 1 // 功能卡牌出现概率修正系数
|
||||
): { type: number; uuid: number } {
|
||||
// 计算修正后的概率
|
||||
const adjustedProbability = {
|
||||
1: CardProbability[1] * heroRate,
|
||||
2: CardProbability[2] * skillRate,
|
||||
3: CardProbability[3] * equipRate,
|
||||
4: CardProbability[4] * specialRate
|
||||
};
|
||||
|
||||
// 计算总概率
|
||||
const totalProbability = Object.values(adjustedProbability).reduce((sum, prob) => sum + prob, 0);
|
||||
|
||||
// 生成0-1之间的随机数
|
||||
const random = Math.random() * totalProbability;
|
||||
let cumulativeProbability = 0;
|
||||
|
||||
// 根据修正后的概率确定卡牌类型
|
||||
let c_type = 1; // 默认类型为伙伴
|
||||
for (const [type, probability] of Object.entries(adjustedProbability)) {
|
||||
cumulativeProbability += probability;
|
||||
if (random <= cumulativeProbability) {
|
||||
c_type = parseInt(type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据类型获取对应的卡牌列表
|
||||
let cardList: number[] = [];
|
||||
switch (c_type) {
|
||||
case cardType.HERO: // 伙伴
|
||||
cardList = getHeroList();
|
||||
break;
|
||||
case cardType.SKILL: // 技能
|
||||
cardList = HeroSkillList;
|
||||
break;
|
||||
case cardType.EQUIP: // 装备
|
||||
cardList = equip_list;
|
||||
break;
|
||||
case cardType.SPECIAL: // 功能卡牌
|
||||
cardList = SuperCardsList;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// 从对应类型的卡牌列表中随机选择一个
|
||||
const randomIndex = Math.floor(Math.random() * cardList.length);
|
||||
return {type:c_type,uuid:cardList[randomIndex]};
|
||||
}
|
||||
|
||||
// 获取指定类型的随机卡牌UUID
|
||||
export function getRandomCardUUIDByType(type: number): number {
|
||||
let cardList: number[] = [];
|
||||
switch (type) {
|
||||
case cardType.HERO: // 伙伴
|
||||
cardList = getHeroList();
|
||||
break;
|
||||
case cardType.SKILL: // 技能
|
||||
cardList = HeroSkillList;
|
||||
break;
|
||||
case cardType.EQUIP: // 装备
|
||||
cardList = equip_list;
|
||||
break;
|
||||
case cardType.SPECIAL: // 功能卡牌
|
||||
cardList = SuperCardsList;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Invalid card type: ${type}`);
|
||||
}
|
||||
|
||||
const randomIndex = Math.floor(Math.random() * cardList.length);
|
||||
return cardList[randomIndex];
|
||||
}
|
||||
|
||||
// 获取多个不重复的指定类型卡牌
|
||||
export function getRandomCardsByType(
|
||||
type: number,
|
||||
count: number,
|
||||
data?: number, // 新增参数:装备子类型 1:武器 2:防具 3:饰品 0或undefined:全部
|
||||
level?: number // 新增参数:装备等级 1-5
|
||||
): { type: number; uuid: number }[] {
|
||||
let cardList: number[] = [];
|
||||
switch (type) {
|
||||
case cardType.HERO:
|
||||
cardList = getHeroList(data); //hero选项是1和0 1是主将
|
||||
break;
|
||||
case cardType.SKILL:
|
||||
cardList = getSkills(data); // 技能时 data是品质
|
||||
break;
|
||||
case cardType.EQUIP:
|
||||
// 根据装备子类型筛选
|
||||
cardList=getEquipUUIDsByType(data) //装备时 data是装备子类型 1:武器 2:防具 3:饰品 0或undefined:全部
|
||||
break;
|
||||
case cardType.SPECIAL:
|
||||
cardList = SuperCardsList;
|
||||
break;
|
||||
case cardType.TALENT:
|
||||
cardList = Object.keys(TalentList).map(key => parseInt(key));
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Invalid card type: ${type}`);
|
||||
}
|
||||
|
||||
// 确保请求数量不超过可用卡牌数量
|
||||
count = Math.min(count, cardList.length);
|
||||
|
||||
// 打乱数组顺序
|
||||
const shuffled = [...cardList].sort(() => Math.random() - 0.5);
|
||||
|
||||
// 返回指定数量的卡牌
|
||||
return shuffled.slice(0, count).map(uuid => ({
|
||||
type,
|
||||
uuid
|
||||
}));
|
||||
}
|
||||
export const SuperCardsType={
|
||||
SPECIAL:1, //特殊效果
|
||||
AOE:2, //伤害技能 范围伤害
|
||||
BUFF:3, //buff技能 范围buff
|
||||
DEBUFF:4, //debuff技能 范围debuff
|
||||
LEVELUP:5, //升级后奖励
|
||||
}
|
||||
export const CTarget={
|
||||
MASTER:1, //主将
|
||||
ENEMY:2, //敌人
|
||||
ALL:3, //所有
|
||||
}
|
||||
|
||||
|
||||
export const SuperCardsList=[3101,3102,3103,3104,3105,3106];
|
||||
export const SuperCards={
|
||||
|
||||
3101:{uuid:3101,name:"陨石爆",quality:QualitySet.GREEN,path:"3101",CTarget:CTarget.ENEMY,type:SuperCardsType.AOE,value1:SkillSet[6005].uuid,value2:1,value3:0,
|
||||
info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害"},
|
||||
3102:{uuid:3102,name:"龙卷群",quality:QualitySet.BLUE,path:"3104",CTarget:CTarget.ENEMY,type:SuperCardsType.AOE,value1:SkillSet[6006].uuid,value2:1,value3:0,
|
||||
info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害"},
|
||||
3103:{uuid:3103,name:"大海啸",quality:QualitySet.PURPLE,path:"3105",CTarget:CTarget.ENEMY,type:SuperCardsType.AOE,value1:SkillSet[6007].uuid,value2:1,value3:0,
|
||||
info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害"},
|
||||
3104:{uuid:3104,name:"攻击力",quality:QualitySet.ORANGE,path:"3106",CTarget:CTarget.MASTER,type:SuperCardsType.BUFF,value1:BuffAttr.AP,value2:5,value3:0},
|
||||
3105:{uuid:3105,name:"生命值",quality:QualitySet.ORANGE,path:"3107",CTarget:CTarget.MASTER,type:SuperCardsType.BUFF,value1:BuffAttr.HP_MAX,value2:5,value3:0},
|
||||
3106:{uuid:3106,name:"防御值",quality:QualitySet.ORANGE,path:"3108",CTarget:CTarget.MASTER,type:SuperCardsType.BUFF,value1:BuffAttr.DEF,value2:5,value3:0},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ffda71d7-624d-40de-8c09-712edd44bfdc",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6f6a81bc-e767-4001-b181-2c18c896cfd0",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import { Items } from "./Items";
|
||||
|
||||
export enum GType{
|
||||
ITEM=1, //物品
|
||||
GOLD=2, //金币
|
||||
DIAMOND=3, //钻石
|
||||
EXP=4, //经验
|
||||
MEAT=5, //能量
|
||||
}
|
||||
export enum CType{
|
||||
GOLD=1, //金币
|
||||
DIAMOND=2, //钻石
|
||||
FREE=3, //免费
|
||||
AD=4, //广告
|
||||
}
|
||||
export const getRandomGoods=()=>{
|
||||
let goods=[1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023]
|
||||
// 随机打乱数组
|
||||
for (let i = goods.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[goods[i], goods[j]] = [goods[j], goods[i]];
|
||||
}
|
||||
return goods.slice(0, 8);
|
||||
}
|
||||
export const Goods={
|
||||
1001:{i_uuid:Items[9001].uuid,num:10000,cast:0,type:GType.GOLD,c_type:CType.FREE},
|
||||
1002:{i_uuid:Items[9002].uuid,num:100000,cast:0,type:GType.GOLD,c_type:CType.AD,},
|
||||
1003:{i_uuid:Items[9003].uuid,num:500000,cast:100,type:GType.GOLD,c_type:CType.DIAMOND},
|
||||
1004:{i_uuid:Items[9004].uuid,num:100,cast:0,type:GType.DIAMOND,c_type:CType.FREE},
|
||||
1005:{i_uuid:Items[9005].uuid,num:200,cast:0,type:GType.DIAMOND,c_type:CType.FREE},
|
||||
1006:{i_uuid:Items[9006].uuid,num:300,cast:0,type:GType.DIAMOND,c_type:CType.AD},
|
||||
1007:{i_uuid:Items[9007].uuid,num:500,cast:0,type:GType.DIAMOND,c_type:CType.AD},
|
||||
1008:{i_uuid:Items[1001].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1009:{i_uuid:Items[1002].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1010:{i_uuid:Items[1003].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1011:{i_uuid:Items[1004].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1012:{i_uuid:Items[1005].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1013:{i_uuid:Items[1006].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1014:{i_uuid:Items[1007].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1015:{i_uuid:Items[1008].uuid,num:1,cast:1,type:GType.ITEM,c_type:CType.DIAMOND},
|
||||
1016:{i_uuid:Items[1001].uuid,num:1,cast:10000,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1017:{i_uuid:Items[1002].uuid,num:1,cast:100000,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1018:{i_uuid:Items[1003].uuid,num:1,cast:500000,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1019:{i_uuid:Items[1004].uuid,num:1,cast:100,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1020:{i_uuid:Items[1005].uuid,num:1,cast:200,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1021:{i_uuid:Items[1006].uuid,num:1,cast:300,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1022:{i_uuid:Items[1007].uuid,num:1,cast:500,type:GType.ITEM,c_type:CType.GOLD},
|
||||
1023:{i_uuid:Items[1008].uuid,num:1,cast:1000,type:GType.ITEM,c_type:CType.GOLD},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0ca1e413-6bfd-4e8a-95cc-56fb3e54075a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
/*
|
||||
* 肉鸽游戏玩家升级强化选项配置表
|
||||
* 提供玩家升级后的属性强化选择
|
||||
*/
|
||||
|
||||
import { BuffAttr } from "./SkillSet"
|
||||
import { QualitySet } from "./BoxSet";
|
||||
|
||||
// 强化类型枚举
|
||||
export const EnhancementType = {
|
||||
ATTACK: 0, // 攻击力强化
|
||||
HEALTH: 1, // 生命值强化
|
||||
ATTACK_SPEED: 2, // 攻击速度强化
|
||||
DEF: 3, // 特殊效果强化
|
||||
}
|
||||
|
||||
// 玩家强化等级追踪
|
||||
export interface PlayerEnhancementProgress {
|
||||
[EnhancementType.ATTACK]: number;
|
||||
[EnhancementType.HEALTH]: number;
|
||||
[EnhancementType.ATTACK_SPEED]: number;
|
||||
[EnhancementType.DEF]: number;
|
||||
}
|
||||
|
||||
// 默认强化进度(所有强化都从0级开始)
|
||||
export const defaultEnhancementProgress: PlayerEnhancementProgress = {
|
||||
[EnhancementType.ATTACK]: 0,
|
||||
[EnhancementType.HEALTH]: 0,
|
||||
[EnhancementType.ATTACK_SPEED]: 0,
|
||||
[EnhancementType.DEF]: 0,
|
||||
};
|
||||
export const defaultEnhancements=()=>{
|
||||
return {
|
||||
[EnhancementType.ATTACK]: 0,
|
||||
[EnhancementType.HEALTH]: 0,
|
||||
[EnhancementType.ATTACK_SPEED]: 0,
|
||||
[EnhancementType.DEF]: 0,
|
||||
}
|
||||
}
|
||||
// 强化选项配置表(一维数组格式)
|
||||
export const EnhancementOptions: EnhancementOption[] = [
|
||||
// 攻击力强化选项
|
||||
{ uuid: 1001, type: EnhancementType.ATTACK, lv: 1, name: "力量训练 I", description: "攻击力 +5", buffType: BuffAttr.ATK, value: 5, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 1002, type: EnhancementType.ATTACK, lv: 2, name: "力量训练 II", description: "攻击力 +12", buffType: BuffAttr.ATK, value: 12, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 1003, type: EnhancementType.ATTACK, lv: 3, name: "力量训练 III", description: "攻击力 +20", buffType: BuffAttr.ATK, value: 20, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 1004, type: EnhancementType.ATTACK, lv: 4, name: "力量训练 IV", description: "攻击力 +35", buffType: BuffAttr.ATK, value: 35, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 1005, type: EnhancementType.ATTACK, lv: 5, name: "力量训练 V", description: "攻击力 +50", buffType: BuffAttr.ATK, value: 50, icon: "3058", rarity: QualitySet.PURPLE },
|
||||
// 生命值强化选项
|
||||
{ uuid: 2001, type: EnhancementType.HEALTH, lv: 1, name: "体质增强 I", description: "生命值 +10", buffType: BuffAttr.HP, value: 10, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 2002, type: EnhancementType.HEALTH, lv: 2, name: "体质增强 II", description: "生命值 +25", buffType: BuffAttr.HP, value: 25, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 2003, type: EnhancementType.HEALTH, lv: 3, name: "体质增强 III", description: "生命值 +40", buffType: BuffAttr.HP, value: 40, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 2004, type: EnhancementType.HEALTH, lv: 4, name: "体质增强 IV", description: "生命值 +65", buffType: BuffAttr.HP, value: 65, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 2005, type: EnhancementType.HEALTH, lv: 5, name: "体质增强 V", description: "生命值 +100", buffType: BuffAttr.HP, value: 100, icon: "3058", rarity: QualitySet.PURPLE },
|
||||
{ uuid: 3003, type: EnhancementType.ATTACK_SPEED, lv: 3, name: "快速出手 III", description: "攻击速度 +3%", buffType: BuffAttr.ATK_CD, value: 3, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 3004, type: EnhancementType.ATTACK_SPEED, lv: 4, name: "快速出手 IV", description: "攻击速度 +4%", buffType: BuffAttr.ATK_CD, value: 4, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 3005, type: EnhancementType.ATTACK_SPEED, lv: 5, name: "快速出手 V", description: "攻击速度 +5%", buffType: BuffAttr.ATK_CD, value: 5, icon: "3058", rarity: QualitySet.PURPLE },
|
||||
// 特殊效果强化选项
|
||||
{ uuid: 4001, type: EnhancementType.DEF, lv: 1, name: "绝对防御 I", description: "免伤 +1%", buffType: BuffAttr.DEF, value: 1, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 4002, type: EnhancementType.DEF, lv: 2, name: "绝对防御 II", description: "免伤 +2%", buffType: BuffAttr.DEF, value: 2, icon: "3058", rarity: QualitySet.GREEN },
|
||||
{ uuid: 4003, type: EnhancementType.DEF, lv: 3, name: "绝对防御 III", description: "免伤 +3%", buffType: BuffAttr.DEF, value: 3, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 4004, type: EnhancementType.DEF, lv: 4, name: "绝对防御 IV", description: "免伤 +4%", buffType: BuffAttr.DEF, value: 4, icon: "3058", rarity: QualitySet.BLUE },
|
||||
{ uuid: 4005, type: EnhancementType.DEF, lv: 5, name: "绝对防御 V", description: "免伤 +5%", buffType: BuffAttr.DEF, value: 5, icon: "3058", rarity: QualitySet.PURPLE },
|
||||
];
|
||||
|
||||
// 强化选项接口定义
|
||||
export interface EnhancementOption {
|
||||
uuid: number; // 强化选项唯一ID
|
||||
type: number; // 强化类型 (EnhancementType)
|
||||
lv: number; // 强化等级
|
||||
name: string; // 强化名称
|
||||
description: string; // 强化描述
|
||||
buffType: number; // 属性类型 (BuffAttr)
|
||||
value: number; // 属性值
|
||||
icon: string; // 图标ID
|
||||
rarity: number; // 稀有度 (Quality)
|
||||
}
|
||||
|
||||
// 获取随机强化选项(基于玩家当前强化进度)
|
||||
export function getEnhancement(playerProgress: PlayerEnhancementProgress, count: number = 3): EnhancementOption[] {
|
||||
const options: EnhancementOption[] = [];
|
||||
const enhancementTypes = Object.values(EnhancementType);
|
||||
|
||||
// 随机选择强化类型
|
||||
const selectedTypes = [];
|
||||
const shuffledTypes = [...enhancementTypes];
|
||||
|
||||
// 随机打乱数组
|
||||
for (let i = shuffledTypes.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[shuffledTypes[i], shuffledTypes[j]] = [shuffledTypes[j], shuffledTypes[i]];
|
||||
}
|
||||
|
||||
// 选择指定数量的强化类型
|
||||
for (let i = 0; i < count && i < shuffledTypes.length; i++) {
|
||||
selectedTypes.push(shuffledTypes[i]);
|
||||
}
|
||||
|
||||
// 为每个类型生成对应等级的选项
|
||||
selectedTypes.forEach(type => {
|
||||
const currentLevel = playerProgress[type] || 0;
|
||||
const nextLevel = Math.min(currentLevel + 1, 5); // 最大等级为5
|
||||
|
||||
const option = getEnhancementOptionByTypeAndLevel(type, nextLevel);
|
||||
if (option) {
|
||||
options.push(option);
|
||||
}
|
||||
});
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
// 获取指定类型和等级的强化选项
|
||||
export function getEnhancementOptionByTypeAndLevel(type: number, level: number): EnhancementOption | null {
|
||||
return EnhancementOptions.find(opt => opt.type === type && opt.lv === level) || null;
|
||||
}
|
||||
|
||||
// 获取所有可用的强化类型
|
||||
export function getAllEnhancementTypes(): number[] {
|
||||
return Object.values(EnhancementType);
|
||||
}
|
||||
|
||||
// 获取指定等级的所有强化选项
|
||||
export function getEnhancementOptionsByLevel(level: number): EnhancementOption[] {
|
||||
return EnhancementOptions.filter(opt => opt.lv === level);
|
||||
}
|
||||
|
||||
// 更新玩家强化进度
|
||||
export function updatePlayerEnhancementProgress(
|
||||
progress: PlayerEnhancementProgress,
|
||||
type: number,
|
||||
levelIncrease: number = 1
|
||||
): PlayerEnhancementProgress {
|
||||
const newProgress = { ...progress };
|
||||
const currentLevel = newProgress[type] || 0;
|
||||
newProgress[type] = Math.min(currentLevel + levelIncrease, 5); // 最大等级为5
|
||||
return newProgress;
|
||||
}
|
||||
|
||||
// 检查某个强化类型是否还能继续升级
|
||||
export function canEnhancementUpgrade(progress: PlayerEnhancementProgress, type: number): boolean {
|
||||
const currentLevel = progress[type] || 0;
|
||||
return currentLevel < 5; // 最大等级为5
|
||||
}
|
||||
|
||||
// 获取某个强化类型的下一级选项
|
||||
export function getNextLevelOption(progress: PlayerEnhancementProgress, type: number): EnhancementOption | null {
|
||||
if (!canEnhancementUpgrade(progress, type)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const currentLevel = progress[type] || 0;
|
||||
const nextLevel = currentLevel + 1;
|
||||
return getEnhancementOptionByTypeAndLevel(type, nextLevel);
|
||||
}
|
||||
|
||||
// 获取可升级的强化选项(排除已满级的)
|
||||
export function getUpgradeableEnhancementOptions(progress: PlayerEnhancementProgress, count: number = 3): EnhancementOption[] {
|
||||
const options: EnhancementOption[] = [];
|
||||
const enhancementTypes = Object.values(EnhancementType);
|
||||
|
||||
// 筛选出可以升级的强化类型
|
||||
const upgradeableTypes = enhancementTypes.filter(type => canEnhancementUpgrade(progress, type));
|
||||
|
||||
if (upgradeableTypes.length === 0) {
|
||||
return options; // 没有可升级的选项
|
||||
}
|
||||
|
||||
// 随机打乱可升级的类型
|
||||
const shuffledTypes = [...upgradeableTypes];
|
||||
for (let i = shuffledTypes.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[shuffledTypes[i], shuffledTypes[j]] = [shuffledTypes[j], shuffledTypes[i]];
|
||||
}
|
||||
|
||||
// 选择指定数量的强化类型
|
||||
const selectedTypes = shuffledTypes.slice(0, Math.min(count, shuffledTypes.length));
|
||||
|
||||
// 为每个类型生成下一级选项
|
||||
selectedTypes.forEach(type => {
|
||||
const option = getNextLevelOption(progress, type);
|
||||
if (option) {
|
||||
options.push(option);
|
||||
}
|
||||
});
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
// 获取玩家某个强化类型的当前等级
|
||||
export function getEnhancementLevel(progress: PlayerEnhancementProgress, type: number): number {
|
||||
return progress[type] || 0;
|
||||
}
|
||||
|
||||
// 获取玩家所有强化的总等级
|
||||
export function getTotalEnhancementLevel(progress: PlayerEnhancementProgress): number {
|
||||
return Object.values(progress).reduce((total, level) => total + level, 0);
|
||||
}
|
||||
|
||||
// 通过UUID获取强化选项
|
||||
export function getEnhancementOptionByUuid(uuid: number): EnhancementOption | null {
|
||||
return EnhancementOptions.find(opt => opt.uuid === uuid) || null;
|
||||
}
|
||||
|
||||
// 获取指定类型的所有强化选项
|
||||
export function getEnhancementOptionsByType(type: number): EnhancementOption[] {
|
||||
return EnhancementOptions.filter(opt => opt.type === type);
|
||||
}
|
||||
|
||||
// 获取指定UUID范围的强化选项
|
||||
export function getEnhancementOptionsByUuidRange(startUuid: number, endUuid: number): EnhancementOption[] {
|
||||
const options: EnhancementOption[] = [];
|
||||
EnhancementOptions.forEach(option => {
|
||||
if (option.uuid >= startUuid && option.uuid <= endUuid) {
|
||||
options.push(option);
|
||||
}
|
||||
});
|
||||
return options;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "bbef9ac6-154b-4e27-9c56-e964e27ef2d5",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* @Author: dgflash
|
||||
* @Date: 2021-11-23 15:28:39
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-01-26 16:42:00
|
||||
*/
|
||||
|
||||
/** 游戏事件 */
|
||||
export enum MissionEvent {
|
||||
CastHeroSkill = "CastHeroSkill",
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "167eb23c-6d7e-4e30-96ca-06fec16eeaa8",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,304 +0,0 @@
|
||||
// 掉落物品接口
|
||||
export interface DropItem {
|
||||
uuid: number; // 物品ID
|
||||
num: number; // 数量
|
||||
type: number; // 类型
|
||||
quality?: number; // 品质
|
||||
}
|
||||
|
||||
// 怪物类型
|
||||
export enum MonsterType {
|
||||
Normal = 1, // 普通怪
|
||||
Elite = 2, // 精英怪
|
||||
Boss = 3, // Boss怪
|
||||
}
|
||||
|
||||
// 掉落倍率配置
|
||||
export const DropRateConfig = {
|
||||
[MonsterType.Normal]: 1,
|
||||
[MonsterType.Elite]: 2,
|
||||
[MonsterType.Boss]: 10,
|
||||
}
|
||||
|
||||
// Boss掉落示例(最多5个不同英雄的碎片)
|
||||
// const bossDrops = getMonsterDrops(50, MonsterType.Boss, 1.2);
|
||||
|
||||
// 精英怪掉落示例(最多2个不同英雄的碎片)
|
||||
// const eliteDrops = getMonsterDrops(50, MonsterType.Elite, 1.2);
|
||||
|
||||
// 普通怪掉落示例(最多1个英雄的碎片)
|
||||
// const normalDrops = getMonsterDrops(50, MonsterType.Normal, 1.2);
|
||||
|
||||
/**
|
||||
* 获取怪物掉落
|
||||
* @param monsterLevel 怪物等级
|
||||
* @param monsterType 怪物类型
|
||||
* @param extraRate 额外倍率(比如玩家的幸运值加成)
|
||||
* @returns 掉落物品数组
|
||||
*/
|
||||
export function getMonsterDrops(
|
||||
monsterLevel: number,
|
||||
monsterType: MonsterType = MonsterType.Normal,
|
||||
extraRate: number = 1
|
||||
): DropItem[] {
|
||||
const drops: DropItem[] = [];
|
||||
const baseMultiplier = getDropMultiplier(monsterLevel);
|
||||
const monsterMultiplier = DropRateConfig[monsterType];
|
||||
const totalMultiplier = baseMultiplier * monsterMultiplier * extraRate;
|
||||
|
||||
// 分离英雄碎片和道具配置
|
||||
const heroChipConfigs = DropConfigList.filter(config => config.type === dorptype.hero_chip);
|
||||
const itemConfigs = DropConfigList.filter(config => config.type === dorptype.items);
|
||||
|
||||
// 获取当前怪物类型可以掉落的英雄碎片数量
|
||||
const maxHeroChips = HeroChipDropCount[monsterType];
|
||||
|
||||
// 随机选择指定数量的英雄碎片
|
||||
const selectedHeroChips = shuffleArray(heroChipConfigs).slice(0, maxHeroChips);
|
||||
|
||||
// 处理英雄碎片掉落
|
||||
for (const config of selectedHeroChips) {
|
||||
if (monsterType === MonsterType.Normal) {
|
||||
// 普通怪按概率掉落
|
||||
if (shouldDrop(config.dropRate * totalMultiplier)) {
|
||||
const dropItem = calculateDrop(config, monsterLevel, monsterType);
|
||||
if (dropItem) {
|
||||
drops.push(dropItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 精英怪和Boss必定掉落
|
||||
const dropItem = calculateDrop(config, monsterLevel, monsterType);
|
||||
if (dropItem) {
|
||||
drops.push(dropItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理道具掉落
|
||||
for (const config of itemConfigs) {
|
||||
if (config.uuid === 9001) {
|
||||
// 金币必定掉落
|
||||
const dropItem = calculateDrop(config, monsterLevel, monsterType);
|
||||
if (dropItem) {
|
||||
drops.push(dropItem);
|
||||
}
|
||||
} else {
|
||||
// 其他道具按概率掉落
|
||||
if (shouldDrop(config.dropRate * totalMultiplier)) {
|
||||
const dropItem = calculateDrop(config, monsterLevel, monsterType);
|
||||
if (dropItem) {
|
||||
drops.push(dropItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return drops;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算是否掉落
|
||||
* @param rate 掉落概率
|
||||
*/
|
||||
function shouldDrop(rate: number): boolean {
|
||||
return Math.random() * 100 <= Math.min(rate, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算单个物品掉落
|
||||
*/
|
||||
function calculateDrop(
|
||||
config: typeof DropConfigList[0],
|
||||
monsterLevel: number,
|
||||
monsterType: MonsterType
|
||||
): DropItem | null {
|
||||
// 计算掉落数量
|
||||
let num = Math.floor(Math.random() * config.num_max) + 1;
|
||||
|
||||
// Boss额外保底
|
||||
if (monsterType === MonsterType.Boss && num < config.num_max * 0.3) {
|
||||
num = Math.floor(config.num_max * 0.3);
|
||||
}
|
||||
|
||||
// 根据类型应用不同规则
|
||||
if (config.type === dorptype.hero_chip) {
|
||||
// 英雄碎片特殊处理
|
||||
return {
|
||||
uuid: config.uuid,
|
||||
num: Math.min(num, 10), // 英雄碎片单次最多10个
|
||||
type: config.type,
|
||||
quality: getHeroQuality(config.uuid)
|
||||
};
|
||||
} else if (config.type === dorptype.items) {
|
||||
// 普通道具处理
|
||||
return {
|
||||
uuid: config.uuid,
|
||||
num: num,
|
||||
type: config.type
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取英雄品质(需要和heroSet配置关联)
|
||||
*/
|
||||
function getHeroQuality(heroId: number): number {
|
||||
// 这里可以从heroSet中获取英雄品质
|
||||
return 1; // 默认品质
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取掉落倍率
|
||||
* @param monsterLevel 怪物等级
|
||||
*/
|
||||
export function getDropMultiplier(monsterLevel: number): number {
|
||||
// 基础倍率
|
||||
let multiplier = Math.max(1, Math.floor(monsterLevel / 10));
|
||||
|
||||
// 等级档位加成
|
||||
if (monsterLevel >= 50) multiplier *= 1.5;
|
||||
if (monsterLevel >= 100) multiplier *= 2;
|
||||
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量生成掉落
|
||||
* @param times 掉落次数
|
||||
* @param params 掉落参数
|
||||
*/
|
||||
export function batchGenerateDrops(
|
||||
times: number,
|
||||
monsterLevel: number,
|
||||
monsterType: MonsterType = MonsterType.Normal,
|
||||
extraRate: number = 1
|
||||
): DropItem[] {
|
||||
const allDrops: DropItem[] = [];
|
||||
|
||||
for (let i = 0; i < times; i++) {
|
||||
const drops = getMonsterDrops(monsterLevel, monsterType, extraRate);
|
||||
allDrops.push(...drops);
|
||||
}
|
||||
|
||||
// 合并相同物品
|
||||
return mergeDrops(allDrops);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并相同物品的掉落
|
||||
*/
|
||||
function mergeDrops(drops: DropItem[]): DropItem[] {
|
||||
const mergedMap = new Map<string, DropItem>();
|
||||
|
||||
drops.forEach(drop => {
|
||||
const key = `${drop.uuid}-${drop.type}`;
|
||||
if (mergedMap.has(key)) {
|
||||
const existing = mergedMap.get(key)!;
|
||||
existing.num += drop.num;
|
||||
} else {
|
||||
mergedMap.set(key, {...drop});
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(mergedMap.values());
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机打乱数组
|
||||
*/
|
||||
function shuffleArray<T>(array: T[]): T[] {
|
||||
const newArray = [...array];
|
||||
for (let i = newArray.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[newArray[i], newArray[j]] = [newArray[j], newArray[i]];
|
||||
}
|
||||
return newArray;
|
||||
}
|
||||
|
||||
export const BoxDrop={
|
||||
1:[
|
||||
{uuid: 9001,dropRate: 10,num_max: 500000,type:0},
|
||||
{uuid: 9003,dropRate: 10,num_max: 500,type:0},
|
||||
],
|
||||
2:[
|
||||
{uuid: 5001,dropRate: 5,num_max: 5,type:1}, // 圣盾战 quality 3
|
||||
{uuid: 5002,dropRate: 30,num_max: 5,type:1}, // 火女 quality 1
|
||||
{uuid: 5003,dropRate: 30,num_max: 5,type:1}, // 牧师 quality 1
|
||||
{uuid: 5004,dropRate: 15,num_max: 5,type:1}, // 自愈骑 quality 2
|
||||
{uuid: 5005,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5006,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5007,dropRate: 5,num_max: 5,type:1}, // 召唤师 quality 3
|
||||
{uuid: 5008,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5009,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5010,dropRate: 5,num_max: 5,type:1}, // quality 3
|
||||
{uuid: 5011,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
],
|
||||
3:[
|
||||
{uuid: 5001,dropRate: 5,num_max: 5,type:1}, // 圣盾战 quality 3
|
||||
{uuid: 5002,dropRate: 30,num_max: 5,type:1}, // 火女 quality 1
|
||||
{uuid: 5003,dropRate: 30,num_max: 5,type:1}, // 牧师 quality 1
|
||||
{uuid: 5004,dropRate: 15,num_max: 5,type:1}, // 自愈骑 quality 2
|
||||
{uuid: 5005,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5006,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5007,dropRate: 5,num_max: 5,type:1}, // 召唤师 quality 3
|
||||
{uuid: 5008,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5009,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5010,dropRate: 5,num_max: 5,type:1}, // quality 3
|
||||
{uuid: 5011,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
],
|
||||
}
|
||||
export const BoxDropCount={
|
||||
1:3,
|
||||
2:3,
|
||||
3:3,
|
||||
}
|
||||
export const dorptype={
|
||||
hero_chip:1,
|
||||
items:2,
|
||||
}
|
||||
export const HeroChipDropCount={
|
||||
1:1,
|
||||
2:2,
|
||||
3:5,
|
||||
}
|
||||
//HeroChipList = [5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027]
|
||||
//ItemsList=[9001,1003]
|
||||
//根据HeroChipList,ItemsList设置掉落概率
|
||||
//参考 heroSet.ts 中 HeroInfo对象数据的quality值来修改,DropConfigList中的dropRaten和um_max值,quality值越大,掉落概率越小,数量越少
|
||||
export const DropConfigList=[
|
||||
{uuid: 5001,dropRate: 5,num_max: 5,type:1}, // 圣盾战 quality 3
|
||||
{uuid: 5002,dropRate: 30,num_max: 5,type:1}, // 火女 quality 1
|
||||
{uuid: 5003,dropRate: 30,num_max: 5,type:1}, // 牧师 quality 1
|
||||
{uuid: 5004,dropRate: 15,num_max: 5,type:1}, // 自愈骑 quality 2
|
||||
{uuid: 5005,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5006,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5007,dropRate: 5,num_max: 5,type:1}, // 召唤师 quality 3
|
||||
{uuid: 5008,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 5009,dropRate: 15,num_max: 5,type:1}, // quality 2
|
||||
{uuid: 5010,dropRate: 5,num_max: 5,type:1}, // quality 3
|
||||
{uuid: 5011,dropRate: 30,num_max: 5,type:1}, // quality 1
|
||||
{uuid: 9001,dropRate: 100,num_max: 5000,type:2},
|
||||
{uuid: 1003,dropRate: 20,num_max: 5,type:2},
|
||||
]
|
||||
// 使用示例:
|
||||
/*
|
||||
// 单次掉落
|
||||
const drops = getMonsterDrops(50, MonsterType.Boss, 1.2);
|
||||
|
||||
// 批量掉落(比如连续击杀多个怪物)
|
||||
const batchDrops = batchGenerateDrops(5, 50, MonsterType.Elite, 1.2);
|
||||
|
||||
// 处理掉落物品
|
||||
drops.forEach(item => {
|
||||
if (item.type === dorptype.hero_chip) {
|
||||
// 处理英雄碎片
|
||||
console.log(`获得英雄碎片: ${item.uuid} x${item.num}`);
|
||||
} else if (item.type === dorptype.items) {
|
||||
// 处理道具
|
||||
console.log(`获得道具: ${item.uuid} x${item.num}`);
|
||||
}
|
||||
});
|
||||
*/
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0388f0b8-c77d-4020-8b9a-dabf774f6502",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ export const geDebuffNum=()=>{
|
||||
- in: 持续时间
|
||||
- hit_num: 命中次数
|
||||
- hit: 伤害倍数
|
||||
- hited: 伤害间隔
|
||||
- hitcd: 伤害间隔
|
||||
- speed: 移动速度
|
||||
- cost: 消耗值
|
||||
|
||||
@@ -267,19 +267,7 @@ export const geDebuffNum=()=>{
|
||||
debuffs: [createDebuffConfig(DebuffAttr.STUN, 0, 1, 50)]
|
||||
*/
|
||||
export const HeroSkillList = [6001,6001,6001,6001,6001,6001]
|
||||
export const getSkills=(quality:number)=>{
|
||||
const heroSkills: number[] = [];
|
||||
|
||||
// 遍历所有技能,找出 for_hero 为 true 且品质匹配的技能
|
||||
Object.values(SkillSet).forEach(skill => {
|
||||
// 检查技能是否有 for_hero 属性且为 true,同时品质匹配
|
||||
if (skill.for_hero === true && skill.quality === quality) {
|
||||
heroSkills.push(skill.uuid);
|
||||
}
|
||||
});
|
||||
console.log("[SkillSet]:getSkills",heroSkills)
|
||||
return heroSkills;
|
||||
}
|
||||
|
||||
// Debuff配置接口
|
||||
export interface DebuffConfig {
|
||||
debuff: DebuffAttr; // debuff类型
|
||||
@@ -295,9 +283,8 @@ export interface BuffConfig {
|
||||
}
|
||||
// 技能配置接口 - 按照6001格式排列
|
||||
export interface SkillConfig {
|
||||
uuid:number,name:string,for_hero:boolean,sp_name:string,AtkedType:AtkedType,path:string,quality:QualitySet,TType:TType,
|
||||
TGroup:TGroup,SType:SType,act:string,DTType:DTType,CdType:CdType,AType:AType,EType:EType,
|
||||
ap:number,cd:number,in:number,hit_num:number,hit:number,hited:number,speed:number,cost:number,fname:string,flash:boolean,with:number,maxC:number,
|
||||
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,
|
||||
buffs:BuffConfig[],debuffs:DebuffConfig[],info:string,hero?:number
|
||||
}
|
||||
|
||||
@@ -305,185 +292,158 @@ export interface SkillConfig {
|
||||
export const SkillSet: Record<number, SkillConfig> = {
|
||||
// ========== 基础攻击 ========== 6001-6099
|
||||
6001: {
|
||||
uuid:6001,name:"挥击",for_hero:false,sp_name:"atk_s1",AtkedType:AtkedType.atked,path:"3036",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0.2,hit_num:1,hit:1,hited:0.2,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
|
||||
},
|
||||
6002: {
|
||||
uuid:6002,name:"挥击",for_hero:false,sp_name:"atk2",AtkedType:AtkedType.atked,path:"3036",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.2,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
|
||||
},
|
||||
6003: {
|
||||
uuid:6003,name:"射击",for_hero:false,sp_name:"arrow",AtkedType:AtkedType.atked,path:"3037",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:3,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人释放箭矢,造成100%攻击的伤害"
|
||||
},
|
||||
6004: {
|
||||
uuid:6004,name:"冰球",for_hero:false,sp_name:"am_ice",AtkedType:AtkedType.ice,path:"3034",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:3,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"
|
||||
},
|
||||
6005: {
|
||||
uuid:6005,name:"火球术",for_hero:true,sp_name:"atk_fires",AtkedType:AtkedType.fire,path:"3039",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:1,hit_num:1,hit:2,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"
|
||||
},
|
||||
6006: {
|
||||
uuid:6006,name:"能量波",for_hero:false,sp_name:"am_blue",AtkedType:AtkedType.ice,path:"3034",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:3,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"
|
||||
},
|
||||
6007: {
|
||||
uuid:6007,name:"圣光波",for_hero:true,sp_name:"am_yellow",AtkedType:AtkedType.fire,path:"3039",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:2,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0,deC:1,deR:50}],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"
|
||||
},
|
||||
// ========== 大招 ========== 6100-6199
|
||||
6101: {
|
||||
uuid:6101,name:"护盾",for_hero:true,sp_name:"shield",AtkedType:AtkedType.atked,path:"3045",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,
|
||||
ap:0,cd:5,in:0,hit_num:1,hit:1,hited:3,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.SHIELD,buV:2,buC:0,buR:100}],debuffs:[],info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"
|
||||
},
|
||||
6102: {
|
||||
uuid:6102,name:"寒冰箭",for_hero:true,sp_name:"arrow_blue",AtkedType:AtkedType.ice,path:"3060",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:1,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:1,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"
|
||||
},
|
||||
6103: {
|
||||
uuid:6103,name:"治疗",for_hero:true,sp_name:"heath_small",AtkedType:AtkedType.atked,path:"3056",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.StartEnd,EType:EType.timeEnd,
|
||||
ap:0,cd:5,in:0,hit_num:1,hit:0,hited:0,speed:0,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"回复最前排队友10%最大生命值的生命"
|
||||
},
|
||||
|
||||
6104: {
|
||||
uuid:6104,name:"烈焰斩击",for_hero:false,sp_name:"max_fireatk",AtkedType:AtkedType.fire,path:"3036",quality:QualitySet.GREEN,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.2,speed:720,cost:10,fname:"max",flash:false,with:0,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害"
|
||||
},
|
||||
|
||||
6105: {
|
||||
uuid:6105,name:"烈火护盾",for_hero:true,sp_name:"max_firedun",AtkedType:AtkedType.atked,path:"3061",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedStart,EType:EType.timeEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:1,speed:80,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害"
|
||||
},
|
||||
|
||||
6106: {
|
||||
uuid:6106,name:"龙卷风",for_hero:true,sp_name:"bwind",AtkedType:AtkedType.wind,path:"3065",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:1,speed:360,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"
|
||||
},
|
||||
|
||||
|
||||
|
||||
6107: {
|
||||
uuid:6107,name:"烈焰射击",for_hero:false,sp_name:"arrow_yellow",AtkedType:AtkedType.fire,path:"3014",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.STUN,dev:0.5,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"
|
||||
},
|
||||
|
||||
6108: {
|
||||
uuid:6108,name:"火墙",for_hero:true,sp_name:"max_fwall",AtkedType:AtkedType.atked,path:"3040",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.timeEnd,
|
||||
ap:50,cd:5,in:0,hit_num:1,hit:1,hited:1,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"
|
||||
},
|
||||
|
||||
6109: {
|
||||
uuid:6109,name:"冰刺",for_hero:true,sp_name:"icez",AtkedType:AtkedType.atked,path:"3049",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:300,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.FROST,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"
|
||||
},
|
||||
|
||||
6110: {
|
||||
uuid:6110,name:"潮汐",for_hero:true,sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"
|
||||
},
|
||||
|
||||
6111: {
|
||||
uuid:6111,name:"陨石术",for_hero:true,sp_name:"max_yunshi",AtkedType:AtkedType.fire,path:"3123",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:500,cd:5,in:0,hit_num:0,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
|
||||
},
|
||||
|
||||
6112: {
|
||||
uuid:6112,name:"冰墙",for_hero:false,sp_name:"icet",AtkedType:AtkedType.atked,path:"3050",quality:QualitySet.BLUE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.cd,AType:AType.linear,EType:EType.animationEnd,
|
||||
ap:400,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:100}],info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"
|
||||
},
|
||||
6113: {
|
||||
uuid:6113,name:"剑雨",for_hero:true,sp_name:"max_jianyu",AtkedType:AtkedType.fire,path:"3123",quality:QualitySet.PURPLE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"max",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:500,cd:5,in:0,hit_num:0,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
|
||||
},
|
||||
|
||||
//召唤取消
|
||||
// 6031:{uuid:6031,name:"召唤骷髅",for_hero:true,sp_name:"zhaohuan",AtkedType:AtkedType.atked,path:"3018",quality:QualitySet.BLUE, TType:TType.Frontline,maxC:1,
|
||||
// TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,CdType:CdType.power,AType:AType.fixedStart,EType:EType.animationEnd,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,hited:1,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"},
|
||||
// 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,
|
||||
// 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:"召唤一个骷髅战士为我方而战"},
|
||||
// ========== 超必杀 ========== 6200-6299
|
||||
6201: {
|
||||
uuid:6201,name:"满天火雨",for_hero:true,sp_name:"atk_fires",AtkedType:AtkedType.atked,path:"3101",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:2,hit_num:1,hit:5,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:5,
|
||||
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,
|
||||
buffs:[],debuffs:[],info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"
|
||||
},
|
||||
|
||||
6202: {
|
||||
uuid:6202,name:"龙卷风爆",for_hero:true,sp_name:"bwind",AtkedType:AtkedType.atked,path:"3069",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.linear,EType:EType.collision,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:1,speed:360,cost:10,fname:"max",flash:false,with:90,maxC:5,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"
|
||||
},
|
||||
6203: {
|
||||
uuid:6203,name:"大潮汐",for_hero:true,sp_name:"watert",AtkedType:AtkedType.atked,path:"3070",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:5,
|
||||
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,
|
||||
buffs:[],debuffs:[{debuff:DebuffAttr.BACK,dev:0,deC:0,deR:50}],info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"
|
||||
},
|
||||
// ==========增强型技能,被动技能,========== 6300-6399
|
||||
6301: {
|
||||
uuid:6301,name:"攻击生命强化Ⅰ",for_hero:true,sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.AP,buV:20,buC:0,buR:100},{buff:BuffAttr.HP,buV:20,buC:0,buR:100}],debuffs:[],info:"增加20%攻击力和生命值"
|
||||
},
|
||||
6302: {
|
||||
uuid:6302,name:"攻击生命强化Ⅱ",for_hero:true,sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3093",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.AP,buV:40,buC:0,buR:100},{buff:BuffAttr.HP,buV:40,buC:0,buR:100}],debuffs:[],info:"增加40%攻击力和生命值"
|
||||
},
|
||||
6303: {
|
||||
uuid:6303,name:"攻击生命强化Ⅲ",for_hero:true,sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.AP,buV:60,buC:0,buR:100},{buff:BuffAttr.HP,buV:60,buC:0,buR:100}],debuffs:[],info:"增加60%攻击力和生命值"
|
||||
},
|
||||
6304: {
|
||||
uuid:6304,name:"攻击生命强化Ⅳ",for_hero:true,sp_name:"max_ap",AtkedType:AtkedType.atked,path:"3065",quality:QualitySet.ORANGE,TType:TType.Frontline,
|
||||
TGroup:TGroup.Ally,SType:SType.buff,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.animationEnd,
|
||||
ap:100,cd:5,in:0,hit_num:1,hit:1,hited:0.3,speed:720,cost:10,fname:"max",flash:false,with:90,maxC:1,
|
||||
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,
|
||||
buffs:[{buff:BuffAttr.AP,buV:80,buC:0,buR:100},{buff:BuffAttr.HP,buV:80,buC:0,buR:100}],debuffs:[],info:"增加80%攻击力和生命值"
|
||||
},
|
||||
|
||||
|
||||
@@ -2,12 +2,8 @@ import { _decorator } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { EquipAttrTarget, EquipInfo } from "../common/config/Equips";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { BuffAttr } from "../common/config/SkillSet";
|
||||
import { EnhancementType } from "../common/config/LevelUp";
|
||||
import { TalentList } from "../common/config/TalentSet";
|
||||
import { SuperCardsType } from "../common/config/CardSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@@ -9,13 +9,10 @@ import { BuffAttr, DebuffAttr, geDebuffNum, getBuffNum, SkillSet, TGroup, TType
|
||||
import { BuffComp } from "./BuffComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
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 { Items, MonsterDropManager } from "../common/config/Items";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { finishCurrGuide, GuideConfig, startGuide } from "../common/config/Guide";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@@ -578,7 +575,6 @@ export class HeroViewComp extends CCComp {
|
||||
switch(skill.act){
|
||||
case "max":
|
||||
this.as.max()
|
||||
this.BUFFCOMP.max_show(skill.fname)
|
||||
this.BUFFCOMP.tooltip(TooltipTypes.skill,skill.name,skill_id)
|
||||
break
|
||||
case "atk":
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { _decorator, Component, Node, ProgressBar, v3, Vec3 } from 'cc';
|
||||
import { HeroViewComp } from './HeroViewComp';
|
||||
import { BuffAttr, CdType, DTType, SKILL_CONST, SkillSet, SType, TGroup, TType } 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 { oops } from 'db://oops-framework/core/Oops';
|
||||
@@ -41,15 +41,14 @@ export class SkillConComp extends CCComp {
|
||||
if(this.HeroView.DEBUFF_STUN <= 0&&this.HeroView.DEBUFF_FROST <= 0) {
|
||||
let skills=this.HeroView.skills
|
||||
for(let i=0;i<skills.length;i++){
|
||||
if(SkillSet[skills[i].uuid].CdType==CdType.cd) {
|
||||
skills[i].cd += dt;
|
||||
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
|
||||
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
|
||||
this.castSkill(SkillSet[skills[i].uuid])
|
||||
this.HeroView.skills[i].cd = 0
|
||||
}
|
||||
}
|
||||
skills[i].cd += dt;
|
||||
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
|
||||
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
|
||||
this.castSkill(SkillSet[skills[i].uuid])
|
||||
this.HeroView.skills[i].cd = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(skills[1]){
|
||||
if(this.HeroView.fac==FacSet.HERO) {
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
import { _decorator, Component, Node, Label, Sprite, SpriteFrame, resources } from 'cc';
|
||||
import { Goods, GType, CType } from '../common/config/Goods';
|
||||
import { Items } from '../common/config/Items';
|
||||
import { NumberFormatter } from '../common/config/BoxSet';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('GoodsComp')
|
||||
export class GoodsComp extends Component {
|
||||
// 数据(仅用于更新显示)
|
||||
private goodsData: any = null;
|
||||
private itemData: any = null;
|
||||
private currentUuid: number = 0;
|
||||
goods_count_key:number=-1
|
||||
|
||||
/**
|
||||
* 更新物品数据
|
||||
* @param uuid 物品UUID
|
||||
*/
|
||||
update_data(uuid: number,key:number) {
|
||||
this.goods_count_key=key
|
||||
this.currentUuid = uuid;
|
||||
this.goodsData = Goods[uuid];
|
||||
|
||||
if (!this.goodsData) {
|
||||
console.error(`Goods data not found for uuid: ${uuid}`);
|
||||
return;
|
||||
}
|
||||
|
||||
this.itemData = Items[this.goodsData.i_uuid];
|
||||
if (!this.itemData) {
|
||||
console.error(`Item data not found for i_uuid: ${this.goodsData.i_uuid}`);
|
||||
return;
|
||||
}
|
||||
|
||||
this.updateIcon();
|
||||
this.updateTexts();
|
||||
this.update_btn()
|
||||
this.update_max_num()
|
||||
}
|
||||
private update_btn( ){
|
||||
if(smc.shop.goods_count[this.goods_count_key]<=0){
|
||||
this.node.getChildByName("btn").getChildByName("ad").active=false
|
||||
this.node.getChildByName("btn").getChildByName("free").active=false
|
||||
this.node.getChildByName("btn").getChildByName("diamond").active=false
|
||||
this.node.getChildByName("btn").getChildByName("gold").active=false
|
||||
this.node.getChildByName("btn").getChildByName("nothing").active=true
|
||||
this.node.getChildByName("btn").getComponent(Sprite).grayscale=true
|
||||
return
|
||||
}
|
||||
this.node.getChildByName("btn").getChildByName("nothing").active=false
|
||||
this.node.getChildByName("btn").getComponent(Sprite).grayscale=false
|
||||
this.node.getChildByName("btn").getChildByName("ad").active=this.goodsData.c_type==CType.AD
|
||||
this.node.getChildByName("btn").getChildByName("free").active=this.goodsData.c_type==CType.FREE
|
||||
this.node.getChildByName("btn").getChildByName("diamond").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(this.goodsData.cast)
|
||||
this.node.getChildByName("btn").getChildByName("gold").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(this.goodsData.cast)
|
||||
this.node.getChildByName("btn").getChildByName("diamond").active=this.goodsData.c_type==CType.DIAMOND
|
||||
this.node.getChildByName("btn").getChildByName("gold").active=this.goodsData.c_type==CType.GOLD
|
||||
|
||||
}
|
||||
/**
|
||||
* 更新图标
|
||||
*/
|
||||
private update_max_num(){
|
||||
this.node.getChildByName("max").getComponent(Label).string=NumberFormatter.formatNumber(smc.shop.goods_count[this.goods_count_key])
|
||||
|
||||
}
|
||||
private updateIcon() {
|
||||
const iconSprite = this.node.getChildByName("icon")?.getComponent(Sprite);
|
||||
if (!iconSprite) return;
|
||||
const path = `gui/items/${this.itemData.path}`;
|
||||
resources.load(path, SpriteFrame, (err, spriteFrame) => {
|
||||
if (err) {
|
||||
console.warn(`icon load failed: ${path}`, err);
|
||||
return;
|
||||
}
|
||||
iconSprite.spriteFrame = spriteFrame;
|
||||
});
|
||||
}
|
||||
|
||||
/** 仅更新文字(名称与数量) */
|
||||
private updateTexts() {
|
||||
// 名称
|
||||
const nameLabel = this.node.getChildByName("name")?.getComponent(Label);
|
||||
if (nameLabel) nameLabel.string = this.itemData.name;
|
||||
// 数量(根节点下的 num)
|
||||
const mainNumLabel = this.node.getChildByName("num")?.getComponent(Label);
|
||||
if (mainNumLabel) mainNumLabel.string = NumberFormatter.formatNumber(this.goodsData.num);
|
||||
}
|
||||
to_buy(){
|
||||
if(smc.shop.goods_count[this.goods_count_key]<=0){
|
||||
oops.gui.toast("商品已售罄")
|
||||
return
|
||||
}
|
||||
if(this.goodsData.c_type==CType.AD){
|
||||
this.do_ad()
|
||||
}else if(this.goodsData.c_type==CType.FREE){
|
||||
this.do_free()
|
||||
}else if(this.goodsData.c_type==CType.DIAMOND){
|
||||
if(smc.data.diamond<this.goodsData.cast){
|
||||
oops.gui.toast("钻石不足")
|
||||
return
|
||||
}
|
||||
this.do_diamond_cast()
|
||||
}else if(this.goodsData.c_type==CType.GOLD){
|
||||
if(smc.data.gold<this.goodsData.cast){
|
||||
oops.gui.toast("金币不足")
|
||||
return
|
||||
}
|
||||
this.do_gold_cast()
|
||||
}
|
||||
}
|
||||
do_buy(){
|
||||
// console.log("[GoodsComp]do_buy",this.goodsData,this.itemData)
|
||||
switch(this.goodsData.type){
|
||||
case GType.ITEM:
|
||||
smc.addItem(this.itemData.uuid,this.goodsData.num) //添加物品
|
||||
break
|
||||
case GType.GOLD:
|
||||
smc.addGold(this.goodsData.num) //添加金币
|
||||
break
|
||||
case GType.DIAMOND:
|
||||
smc.addDiamond(this.goodsData.num) //添加钻石
|
||||
break
|
||||
case GType.MEAT: //添加肉
|
||||
break
|
||||
case GType.EXP: //添加经验
|
||||
smc.addExp(this.goodsData.num)
|
||||
break
|
||||
}
|
||||
smc.shop.goods_count[this.goods_count_key]--
|
||||
this.update_btn()
|
||||
this.update_max_num()
|
||||
}
|
||||
|
||||
do_ad(){
|
||||
if(this.goodsData.c_type==CType.AD){
|
||||
this.do_ad_back(this.do_buy,this.ad_back_false)
|
||||
}
|
||||
}
|
||||
ad_back_false(){
|
||||
// console.log("ad_back_false")
|
||||
}
|
||||
do_ad_back(success:Function,fail:Function){
|
||||
success.call(this)
|
||||
}
|
||||
do_free(){
|
||||
if(this.goodsData.c_type==CType.FREE){
|
||||
this.do_buy()
|
||||
}
|
||||
}
|
||||
do_diamond_cast(){
|
||||
if(this.goodsData.c_type==CType.DIAMOND){
|
||||
smc.spendDiamond(this.goodsData.cast)
|
||||
this.do_buy()
|
||||
}
|
||||
}
|
||||
do_gold_cast(){
|
||||
if(this.goodsData.c_type==CType.GOLD){
|
||||
smc.spendGold(this.goodsData.cast)
|
||||
this.do_buy()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "e24167ce-79d0-4f99-a3d8-f144bbe959a3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import { _decorator, Component, instantiate, Node, Prefab, UITransform } from 'cc';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
import { HeroConSet } from '../common/config/BoxSet';
|
||||
import { getHeroList } from '../common/config/heroSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HeroPageComp')
|
||||
export class HeroPageComp extends Component {
|
||||
start() {
|
||||
// console.log("[HeroPageComp]:start")
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
onEnable(){
|
||||
this.update_heros()
|
||||
|
||||
}
|
||||
update_heros(){
|
||||
let heros=getHeroList()
|
||||
// console.log("[HeroPageComp]:update_heros",heros)
|
||||
let height= Math.ceil(heros.length/3)*315+30
|
||||
this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform).setContentSize(720,height)
|
||||
// console.log("[HeroPageComp]:UITransform height",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
|
||||
this.clear_heros()
|
||||
for(let i=0;i<heros.length;i++){
|
||||
let hero=heros[i]
|
||||
if(hero){
|
||||
this.load_hero(hero)
|
||||
}
|
||||
}
|
||||
}
|
||||
load_hero(uuid:number){
|
||||
|
||||
}
|
||||
clear_heros(){
|
||||
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
|
||||
let children=parent.children
|
||||
// console.log("[HeroPageComp]:clear_heros",children)
|
||||
for(let i=0;i<children.length;i++){
|
||||
children[i].destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "985ee2ae-8a25-4d68-a4f3-d909f5b2c225",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
import { _decorator, Component, Node, Label, Sprite, resources, SpriteFrame } from 'cc';
|
||||
import { Items } from '../common/config/Items';
|
||||
import { QualitySet } from '../common/config/BoxSet';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
import { UIID } from '../common/config/GameUIConfig';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ItemComp')
|
||||
export class ItemComp extends Component {
|
||||
item_uuid: number = 0;
|
||||
item_count: number = 1;
|
||||
type: number = 0;
|
||||
slot: number = 0;
|
||||
no_show:boolean=false
|
||||
|
||||
|
||||
|
||||
start() {
|
||||
// console.log("[ItemComp]:start");
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新物品数据
|
||||
* @param hero_uuid 物品ID
|
||||
* @param count 物品数量
|
||||
* @param args 额外参数
|
||||
*/
|
||||
update_data(hero_uuid: number, count: number = 1, args: any = {}) {
|
||||
this.item_uuid = hero_uuid;
|
||||
this.item_count = count;
|
||||
this.type = args.type || 0;
|
||||
this.slot = args.slot || 0;
|
||||
this.no_show = args.no_show || false;
|
||||
// console.log("[ItemComp]:update_data", hero_uuid, count, this.type, this.slot, args);
|
||||
|
||||
// 获取物品配置
|
||||
const itemData = Items[hero_uuid];
|
||||
if (!itemData) {
|
||||
console.error("[ItemComp]: Item not found", hero_uuid);
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置物品图标
|
||||
this.setItemIcon(itemData.path);
|
||||
|
||||
// 设置品质边框
|
||||
this.setQualityFrame(itemData.quality);
|
||||
|
||||
// 设置数量显示
|
||||
this.setItemCount(count);
|
||||
|
||||
// 设置选中状态
|
||||
if (args.selected) {
|
||||
this.setSelected(true);
|
||||
} else {
|
||||
this.setSelected(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置物品图标
|
||||
* @param iconPath 图标路径
|
||||
*/
|
||||
private setItemIcon(iconPath: string) {
|
||||
let path=`gui/items/${iconPath}`
|
||||
// console.log("[ItemComp]: setItemIcon", path);
|
||||
resources.load(path, SpriteFrame, (err, spriteFrame) => {
|
||||
if (err) {
|
||||
console.error("[ItemComp]: Failed to load item icon", iconPath, err);
|
||||
return;
|
||||
}
|
||||
// console.log("[ItemComp]: setItemIcon", iconPath, spriteFrame);
|
||||
this.node.getChildByName("icon").getComponent(Sprite)!.spriteFrame = spriteFrame;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置品质边框
|
||||
* @param quality 品质类型
|
||||
*/
|
||||
private setQualityFrame(quality: QualitySet) {
|
||||
// 隐藏所有品质边框
|
||||
this.hideAllQualityFrames();
|
||||
|
||||
// 根据品质显示对应边框
|
||||
switch (quality) {
|
||||
case QualitySet.GREEN:
|
||||
this.node.getChildByName("q1").active = true;
|
||||
break;
|
||||
case QualitySet.BLUE:
|
||||
this.node.getChildByName("q2").active = true;
|
||||
break;
|
||||
case QualitySet.PURPLE:
|
||||
this.node.getChildByName("q3").active = true;
|
||||
break;
|
||||
case QualitySet.ORANGE:
|
||||
this.node.getChildByName("q4").active = true;
|
||||
break;
|
||||
default:
|
||||
// 默认使用绿色边框
|
||||
this.node.getChildByName("q").active = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏所有品质边框
|
||||
*/
|
||||
private hideAllQualityFrames() {
|
||||
this.node.getChildByName("q").active = false;
|
||||
this.node.getChildByName("q1").active = false;
|
||||
this.node.getChildByName("q2").active = false;
|
||||
this.node.getChildByName("q3").active = false;
|
||||
this.node.getChildByName("q4").active = false;
|
||||
this.node.getChildByName("focus").active = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置物品数量
|
||||
* @param count 数量
|
||||
*/
|
||||
private setItemCount(count: number) {
|
||||
this.node.getChildByName("num").getComponent(Label)!.string = count.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置选中状态
|
||||
* @param selected 是否选中
|
||||
*/
|
||||
private setSelected(selected: boolean) {
|
||||
this.node.getChildByName("focus").active = selected;
|
||||
}
|
||||
|
||||
/**
|
||||
* 物品点击事件
|
||||
*/
|
||||
do_click() {
|
||||
// console.log("[ItemComp]: Item clicked", this.item_uuid, this.item_count);
|
||||
|
||||
// 根据类型处理不同逻辑
|
||||
switch (this.type) {
|
||||
case 1: // 普通点击
|
||||
this.onItemClick();
|
||||
break;
|
||||
case 2: // 选择物品
|
||||
this.onItemSelect();
|
||||
break;
|
||||
case 3: // 使用物品
|
||||
this.onItemUse();
|
||||
break;
|
||||
default:
|
||||
this.onItemClick();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通物品点击
|
||||
*/
|
||||
private onItemClick() {
|
||||
// 显示物品信息或执行其他逻辑
|
||||
// console.log("[ItemComp]: Show item info", this.item_uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择物品
|
||||
*/
|
||||
private onItemSelect() {
|
||||
// 处理物品选择逻辑
|
||||
// console.log("[ItemComp]: Item selected", this.item_uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用物品
|
||||
*/
|
||||
private onItemUse() {
|
||||
// 处理物品使用逻辑
|
||||
// console.log("[ItemComp]: Use item", this.item_uuid);
|
||||
}
|
||||
show_item_info(){
|
||||
if(this.no_show){
|
||||
return
|
||||
}
|
||||
oops.gui.open(UIID.ItemInfo, { item_uuid: this.item_uuid ,count:this.item_count});
|
||||
}
|
||||
/**
|
||||
* 获取物品UUID
|
||||
*/
|
||||
getItemUUID(): number {
|
||||
return this.item_uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物品数量
|
||||
*/
|
||||
getItemCount(): number {
|
||||
return this.item_count;
|
||||
}
|
||||
addItemCount(count:number){
|
||||
this.item_count+=count
|
||||
this.setItemCount(this.item_count)
|
||||
}
|
||||
/**
|
||||
* 设置物品类型
|
||||
*/
|
||||
setItemType(type: number) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置物品槽位
|
||||
*/
|
||||
setItemSlot(slot: number) {
|
||||
this.slot = slot;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "691f8376-3937-42db-ae4b-771d4cc67b25",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import { _decorator, Animation, Component, Label, Node, resources, Sprite, SpriteAtlas, tween, v3 } from 'cc';
|
||||
import { SuperCards, SuperCardsType } from '../common/config/CardSet';
|
||||
import { SkillSet } from '../common/config/SkillSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('LuckCardComp')
|
||||
export class LuckCardComp extends Component {
|
||||
timer:number=3;
|
||||
start() {
|
||||
this.timer=2
|
||||
// console.log("[LuckCardComp]:start")
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
this.timer-=deltaTime
|
||||
if(this.timer<=0){
|
||||
let anim=this.node.getComponent(Animation)
|
||||
if(anim) anim.play("luckcardend")
|
||||
this.do_destroy()
|
||||
this.timer=2
|
||||
}
|
||||
}
|
||||
show_card(card:any){
|
||||
var icon_path = "game/heros/cards"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = this.node.getChildByName("icon").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SuperCards[card.uuid].path);
|
||||
});
|
||||
this.node.getChildByName("name").getComponent(Label).string=SuperCards[card.uuid].name
|
||||
switch(SuperCards[card.uuid].type){
|
||||
case SuperCardsType.BUFF:
|
||||
this.node.getChildByName("val").getComponent(Label).string="+"+SuperCards[card.uuid].value2
|
||||
break
|
||||
case SuperCardsType.AOE:
|
||||
this.node.getChildByName("val").getComponent(Label).string=SkillSet[SuperCards[card.uuid].value1].name+"X"+SuperCards[card.uuid].value2
|
||||
break
|
||||
}
|
||||
}
|
||||
do_destroy(){
|
||||
tween(this.node)
|
||||
.to(0.2, {
|
||||
scale: v3(2,2,0),
|
||||
}, {onComplete:()=>{
|
||||
this.node.destroy()
|
||||
}})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "598155fc-f31b-4496-b1e4-82219435f425",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
import { _decorator, resources, Sprite, SpriteAtlas ,Node, ProgressBar, tween, v3, Label, Animation, CCString, CCInteger} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { CdType, SkillSet } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { MissionEvent } from "../common/config/MissionEvent";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MSkillComp')
|
||||
@ecs.register('MSkill', false)
|
||||
export class MSkillComp extends CCComp {
|
||||
@property(CCString)
|
||||
skill_slot:string="skill1"
|
||||
@property(CCInteger)
|
||||
skill_slot_index:number=1
|
||||
skill:any=null
|
||||
skill_cd_bar_progress:any=null
|
||||
max_show:boolean=false
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
onLoad() {
|
||||
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
this.on(GameEvent.MasterCalled,this.master_called,this)
|
||||
// this.node.getChildByName("icon").getChildByName("cd").active=false
|
||||
}
|
||||
start(){
|
||||
this.fight_ready()
|
||||
}
|
||||
private master_called(e:any,data:any){
|
||||
// console.log("[EquipSkillComp]: master_called",data)
|
||||
let hero=HeroInfo[data.uuid]
|
||||
if(hero.skills.length>0){
|
||||
this.get_skill(null,{slot:this.skill_slot,uuid:hero.skills[this.skill_slot_index]})
|
||||
}
|
||||
}
|
||||
|
||||
fight_ready(){
|
||||
// console.log("[MSkillComp]: fight_ready",this.node)
|
||||
this.node.getChildByName("icon").active=false
|
||||
this.hide_skill_get(null,"skill1")
|
||||
this.skill={
|
||||
uuid:0,
|
||||
name:"skill1",
|
||||
type:0, //1 被动 0 主动
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
active:false,
|
||||
}
|
||||
|
||||
}
|
||||
update(dt: number): void {
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
|
||||
}
|
||||
show_max(){
|
||||
this.node.getChildByName("light").active=true
|
||||
this.node.getComponent(Animation).play()
|
||||
}
|
||||
hide_max(){
|
||||
this.max_show=false
|
||||
this.node.getChildByName("light").active=false
|
||||
this.node.setScale(1,1,1)
|
||||
this.node.getComponent(Animation).stop()
|
||||
}
|
||||
spell_skill(){
|
||||
// console.log("spell_skill")
|
||||
this.skill.cd_time=0
|
||||
tween(this.node).to(0.1, {scale:v3(1.2,1.2,1)},{onComplete:()=>{
|
||||
tween(this.node).to(0.2, {scale:v3(1,1,1)}).start()
|
||||
}}).start()
|
||||
this.do_skill(this.skill.uuid)
|
||||
this.hide_max()
|
||||
}
|
||||
|
||||
do_skill(uuid:number){
|
||||
oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid)
|
||||
}
|
||||
|
||||
get_skill(e:GameEvent,data:any){
|
||||
// console.log("[MSkillComp]: get_skill",data)
|
||||
if(data.slot==this.skill_slot||this.skill_slot_index==data.slot){
|
||||
this.skill.uuid=data.uuid
|
||||
this.skill.skill_name=SkillSet[data.uuid].name
|
||||
this.skill.type=1
|
||||
this.skill.cd=SkillSet[data.uuid].cd
|
||||
this.skill.cd_time=SkillSet[data.uuid].cd
|
||||
let icon1 = this.node.getChildByName("icon")
|
||||
icon1.active=true
|
||||
// if(SkillSet[data.uuid].CdType!=CdType.cd){
|
||||
// icon1.getChildByName("cd").active=false
|
||||
// }
|
||||
var icon_path = "game/heros/cards"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon1.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
call_skill_card(e:any,data:any){
|
||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect,{slot:data})
|
||||
}
|
||||
|
||||
|
||||
show_info(e:any,data:any){
|
||||
// console.log("[MSkillComp]: show_info",this.skill)
|
||||
|
||||
}
|
||||
|
||||
private hide_skill_get(e:any,data:string){
|
||||
this.node.getChildByName("get").active =false
|
||||
this.node.getChildByName("tip").active =false
|
||||
this.node.getChildByName("light").active=false
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "e0acc008-a00f-4682-ba4f-c47506bddf26",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { GoodsComp } from './GoodsComp';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { getRandomGoods } from '../common/config/Goods';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ShopPageComp')
|
||||
export class ShopPageComp extends Component {
|
||||
daily:any[]=[]
|
||||
weekly:any[]=[]
|
||||
monthly:any[]=[]
|
||||
special:any[]=[]
|
||||
start() {
|
||||
this.update_daily()
|
||||
this.update_weekly()
|
||||
}
|
||||
update_daily(){
|
||||
let items=this.node.getChildByName("daily").getChildByName("items").children
|
||||
for(let i=0;i<items.length;i++){
|
||||
let goods=items[i]
|
||||
goods.getComponent(GoodsComp).update_data(smc.shop.daily[i],i)
|
||||
}
|
||||
}
|
||||
update_weekly(){
|
||||
if(smc.shop.weekly.length ==0) {
|
||||
this.weekly=getRandomGoods()
|
||||
}
|
||||
smc.shop.weekly=this.weekly
|
||||
let items=this.node.getChildByName("weekly").getChildByName("items").children
|
||||
for(let i=0;i<items.length;i++){
|
||||
let goods=items[i]
|
||||
goods.getComponent(GoodsComp).update_data(smc.shop.weekly[i],i+4)
|
||||
}
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6e8e04b0-e0eb-4668-8543-30322e2c359f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { _decorator, Animation, Collider2D, Contact2DType, Tween, v3, Vec3 } from "cc";
|
||||
import { _decorator, Animation, CCBoolean, Collider2D, Contact2DType, Tween, v3, Vec3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { BezierMove } from "../BezierMove/BezierMove";
|
||||
@@ -13,9 +13,9 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('AtkConCom')
|
||||
@ecs.register('AtkCon', false)
|
||||
export class AtkConCom extends CCComp {
|
||||
@property({ type:Boolean })
|
||||
@property
|
||||
public anmEnd: boolean = false;
|
||||
@property({ type:Boolean })
|
||||
@property
|
||||
public cbox: boolean = false;
|
||||
// 核心标识和配置
|
||||
s_uuid:number = 0;
|
||||
@@ -193,9 +193,7 @@ export class AtkConCom extends CCComp {
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
|
||||
//直线移动
|
||||
// if(this.skillConfig.AType == AType.linear) this.startLinearMove(deltaTime);
|
||||
|
||||
this.toDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { _decorator, instantiate, Node, Prefab, v3, Vec3 } from "cc";
|
||||
import { _decorator, CCBoolean, CCInteger, instantiate, Node, Prefab, v3, Vec3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
@@ -15,18 +15,18 @@ export class SkillViewCom extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
@property({ type: Prefab })
|
||||
atkPrefab: Prefab = null!
|
||||
@property({ type: Number })
|
||||
runType: number = 0;
|
||||
@property({ type: Boolean })
|
||||
@property
|
||||
hasReady: boolean = false;
|
||||
@property({ type: Number })
|
||||
ReadyTime: number = 0;
|
||||
@property({ type: Number })
|
||||
ready_y: number = 0;
|
||||
@property({ type: Number })
|
||||
atk_x: number = 0;
|
||||
@property({ type: Number })
|
||||
atk_y: number = 0;
|
||||
@property({ type: CCInteger })
|
||||
ReadyTime: number = 0
|
||||
@property({ type: CCInteger })
|
||||
runType: number = 0
|
||||
@property({ type: CCInteger })
|
||||
ready_y: number = 0
|
||||
@property({ type: CCInteger })
|
||||
atk_x: number = 0
|
||||
@property({ type: CCInteger })
|
||||
atk_y: number = 0
|
||||
|
||||
endTime: number = 0;
|
||||
readyFinish: boolean = false;
|
||||
@@ -174,8 +174,6 @@ export class SkillViewCom extends CCComp {
|
||||
console.log(`${this.cName}_[SkillViewCom] skille run type: fixedEnd`)
|
||||
atkNode.getComponent(AtkConCom).do_fixedEnd()
|
||||
}
|
||||
|
||||
|
||||
move(dt: number): void {
|
||||
// console.log(`${this.cName}_[SkillViewCom] move`)
|
||||
if(this.caster != null&&this.caster.node!=null) this.node.setPosition(this.caster.node.position.x,this.caster.node.position.y+this.ready_y)
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc';
|
||||
// import { SkillCom } from './SkillCom';
|
||||
// import { smc } from '../common/SingletonModuleComp';
|
||||
// const { ccclass, property } = _decorator;
|
||||
|
||||
// @ccclass('BezCom')
|
||||
// export class BezCom extends Component {
|
||||
// start() {
|
||||
// let base =this.node.getComponent(SkillCom)
|
||||
// // if(this.node.parent.scale.x < 0){
|
||||
// // base.t_pos.x=base.t_pos.x*-1
|
||||
// // }
|
||||
// let s_pos = v3(this.node.position.x,this.node.position.y+35)
|
||||
// let c_pos = v3((base.t_pos.x+this.node.position.x)/2,this.node.position.y+200)
|
||||
// let e_pos = v3(base.t_pos.x,this.node.position.y+50)
|
||||
// let time =Math.abs(Math.abs(base.t_pos.x-this.node.position.x)/base.speed)
|
||||
// BezCom.bezierTo(this.node,time,s_pos,c_pos,e_pos,{
|
||||
// onComplete: (target?: object) => {
|
||||
// base.is_destroy=true
|
||||
// },
|
||||
// }).start();
|
||||
// }
|
||||
|
||||
// update(deltaTime: number) {
|
||||
// if(smc.mission.pause) return
|
||||
// }
|
||||
|
||||
// public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) {
|
||||
// opts = opts || Object.create(null);
|
||||
// /*
|
||||
// * @desc 二阶贝塞尔
|
||||
// * @param {number} t 当前百分比
|
||||
// * @param {} p1 起点坐标
|
||||
// * @param {} cp 控制点
|
||||
// * @param {} p2 终点坐标
|
||||
// * @returns {any}
|
||||
// */
|
||||
// let twoBezier = (t:number, p1: Vec3, cp: Vec3, p2: Vec3) => {
|
||||
// let x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
|
||||
// let y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
|
||||
// return v3(x, y, 0);
|
||||
// };
|
||||
// opts.onUpdate = (arg: Vec3, ratio: number) => {
|
||||
// target.position = twoBezier(ratio, c1, c2, to);
|
||||
// };
|
||||
// return tween(target).to(duration, {}, opts);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "5ebc6679-2a71-424f-bacf-48f20949fbd3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user