品质统一在boxset设定
This commit is contained in:
@@ -9,11 +9,12 @@ import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroSkillList, SkillSet } from "../common/config/SkillSet";
|
||||
import { cardType, getRandomCardUUID, Quality, SuperCards } from "../common/config/CardSet";
|
||||
import { cardType, getRandomCardUUID, SuperCards } from "../common/config/CardSet";
|
||||
import { EquipInfo, EquipType } from "../common/config/Equips";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { EnhancementOptions } from "../common/config/LevelUp";
|
||||
import { TalentList } from "../common/config/TalentSet";
|
||||
import { QualitySet } from "../common/config/BoxSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -232,7 +233,7 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("info").getComponent(Label).string=data.description
|
||||
}
|
||||
|
||||
do_card_bg_show(q:number=Quality.WHITE){
|
||||
do_card_bg_show(q:number=QualitySet.GREEN){
|
||||
let show=this.node.getChildByName("show")
|
||||
show.getChildByName("ap").active=false
|
||||
show.getChildByName("hp").active=false
|
||||
@@ -275,32 +276,30 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("mask").getChildByName("func").active=true
|
||||
break
|
||||
}
|
||||
show.getChildByName("q1").active=q==Quality.WHITE
|
||||
show.getChildByName("q2").active=q==Quality.GREEN
|
||||
show.getChildByName("q3").active=q==Quality.BLUE
|
||||
show.getChildByName("q4").active=q==Quality.PURPLE
|
||||
show.getChildByName("q5").active=q==Quality.ORANGE
|
||||
show.getChildByName("fq1").active=q==Quality.WHITE
|
||||
show.getChildByName("fq2").active=q==Quality.GREEN
|
||||
show.getChildByName("fq3").active=q==Quality.BLUE
|
||||
show.getChildByName("fq4").active=q==Quality.PURPLE
|
||||
show.getChildByName("fq5").active=q==Quality.ORANGE
|
||||
show.getChildByName("q2").active=q==QualitySet.GREEN
|
||||
show.getChildByName("q3").active=q==QualitySet.BLUE
|
||||
show.getChildByName("q4").active=q==QualitySet.PURPLE
|
||||
show.getChildByName("q5").active=q==QualitySet.ORANGE
|
||||
show.getChildByName("fq2").active=q==QualitySet.GREEN
|
||||
show.getChildByName("fq3").active=q==QualitySet.BLUE
|
||||
show.getChildByName("fq4").active=q==QualitySet.PURPLE
|
||||
show.getChildByName("fq5").active=q==QualitySet.ORANGE
|
||||
// this.node.getChildByName("show").getChildByName("coins").active=false
|
||||
// this.node.getChildByName("show").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
|
||||
}
|
||||
|
||||
get_cost_gold(quality:number){
|
||||
switch(quality){
|
||||
case Quality.GREEN:
|
||||
case QualitySet.GREEN:
|
||||
return FightSet.GREEN_GOLD
|
||||
|
||||
case Quality.BLUE:
|
||||
case QualitySet.BLUE:
|
||||
return FightSet.BLUE_GOLD
|
||||
|
||||
case Quality.PURPLE:
|
||||
case QualitySet.PURPLE:
|
||||
return FightSet.PURPLE_GOLD
|
||||
|
||||
case Quality.ORANGE:
|
||||
case QualitySet.ORANGE:
|
||||
return FightSet.ORANGE_GOLD
|
||||
default:
|
||||
return 0
|
||||
|
||||
@@ -7,11 +7,12 @@ import { cardType, getRandomCardsByType } from "../common/config/CardSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
||||
import { EquipType } from "../common/config/Equips";
|
||||
import { getSkills, Quality } from "../common/config/SkillSet";
|
||||
import { getSkills } from "../common/config/SkillSet";
|
||||
import { getEnhancement } from "../common/config/LevelUp";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { getHeroList } from "../common/config/heroSet";
|
||||
import { QualitySet } from "../common/config/BoxSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -112,7 +113,7 @@ export class CardsCompComp extends CCComp {
|
||||
|
||||
}
|
||||
talent_select(data:any){
|
||||
let list=getRandomCardsByType(cardType.TALENT,3,Quality.GREEN)
|
||||
let list=getRandomCardsByType(cardType.TALENT,3,QualitySet.GREEN)
|
||||
console.log("[CardsComp]:天赋选择卡牌列表",list)
|
||||
this.card1c.talent_select(list[0],data)
|
||||
this.card2c.talent_select(list[1],data)
|
||||
@@ -138,11 +139,11 @@ export class CardsCompComp extends CCComp {
|
||||
hero_skill_select(data:any){
|
||||
let list=[]
|
||||
if(data.slot=="skill1"){
|
||||
list =getRandomCardsByType(cardType.SKILL,3,Quality.GREEN)
|
||||
list =getRandomCardsByType(cardType.SKILL,3,QualitySet.GREEN)
|
||||
}else if(data.slot=="skill2"){
|
||||
list=getRandomCardsByType(cardType.SKILL,3,Quality.BLUE)
|
||||
list=getRandomCardsByType(cardType.SKILL,3,QualitySet.BLUE)
|
||||
}else if(data.slot=="skill3"){
|
||||
list=getRandomCardsByType(cardType.SKILL,3,Quality.PURPLE)
|
||||
list=getRandomCardsByType(cardType.SKILL,3,QualitySet.PURPLE)
|
||||
}
|
||||
console.log("[CardsComp]:技能选择卡牌列表",list)
|
||||
this.card1c.hero_skill_select(list[0],data)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { _decorator, Animation, AnimationClip, Component, Label, Node, resources } from 'cc';
|
||||
import { HeroInfo, HQuality, HType } from '../common/config/heroSet';
|
||||
import { HeroInfo, HType } from '../common/config/heroSet';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
import { UIID } from '../common/config/GameUIConfig';
|
||||
import { GameSet, HeroConSet } from '../common/config/BoxSet';
|
||||
import { GameSet, HeroConSet, QualitySet } from '../common/config/BoxSet';
|
||||
import { HttpReturn } from 'db://oops-framework/libs/network/HttpRequest';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -44,14 +44,14 @@ export class HCardUICom extends Component {
|
||||
// this.node.getChildByName("slv").getChildByName("lv3").active=smc.heros[uuid].slv>=3
|
||||
// this.node.getChildByName("slv").getChildByName("lv4").active=smc.heros[uuid].slv>=4
|
||||
// this.node.getChildByName("slv").getChildByName("lv5").active=smc.heros[uuid].slv>=5
|
||||
this.node.getChildByName("g").active=hero_data.quality==HQuality.GREEN
|
||||
this.node.getChildByName("gg").active=hero_data.quality==HQuality.GREEN
|
||||
this.node.getChildByName("b").active=hero_data.quality==HQuality.BLUE
|
||||
this.node.getChildByName("bg").active=hero_data.quality==HQuality.BLUE
|
||||
this.node.getChildByName("p").active=hero_data.quality==HQuality.PURPLE
|
||||
this.node.getChildByName("pg").active=hero_data.quality==HQuality.PURPLE
|
||||
this.node.getChildByName("y").active=hero_data.quality==HQuality.ORANGE
|
||||
this.node.getChildByName("yg").active=hero_data.quality==HQuality.ORANGE
|
||||
this.node.getChildByName("g").active=hero_data.quality==QualitySet.GREEN
|
||||
this.node.getChildByName("gg").active=hero_data.quality==QualitySet.GREEN
|
||||
this.node.getChildByName("b").active=hero_data.quality==QualitySet.BLUE
|
||||
this.node.getChildByName("bg").active=hero_data.quality==QualitySet.BLUE
|
||||
this.node.getChildByName("p").active=hero_data.quality==QualitySet.PURPLE
|
||||
this.node.getChildByName("pg").active=hero_data.quality==QualitySet.PURPLE
|
||||
this.node.getChildByName("y").active=hero_data.quality==QualitySet.ORANGE
|
||||
this.node.getChildByName("yg").active=hero_data.quality==QualitySet.ORANGE
|
||||
this.node.getChildByName("type").getChildByName("w").active=hero_data.type==HType.warrior
|
||||
this.node.getChildByName("type").getChildByName("r").active=hero_data.type==HType.remote
|
||||
this.node.getChildByName("type").getChildByName("m").active=hero_data.type==HType.mage
|
||||
|
||||
@@ -10,6 +10,7 @@ import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { HeroPos } from "../common/config/heroSet";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { QualitySet } from "../common/config/BoxSet";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -112,7 +113,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
this.current_hero_uuid = uuid
|
||||
this.heros[this.current_hero_num].uuid = uuid
|
||||
this.heros[this.current_hero_num].count = 1
|
||||
this.heros[this.current_hero_num].quality = 0
|
||||
this.heros[this.current_hero_num].quality = QualitySet.GREEN
|
||||
this.addHero(uuid, false)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
|
||||
import { QualitySet } from "../common/config/BoxSet";
|
||||
import { BuffAttr } from "../common/config/SkillSet";
|
||||
import { getMonList, HQuality } from "../common/config/heroSet";
|
||||
import { getMonList } from "../common/config/heroSet";
|
||||
|
||||
/**
|
||||
* 怪物类型枚举
|
||||
@@ -273,13 +274,13 @@ export function generateStageConfig(stageNumber: number, level: number = 1): Mon
|
||||
export function getMonsterUUIDsByType(monsterType: MonsterType): number[] {
|
||||
switch (monsterType) {
|
||||
case MonsterType.NORMAL:
|
||||
return getMonList(HQuality.GREEN); // 绿色品质为普通怪物
|
||||
return getMonList(QualitySet.GREEN); // 绿色品质为普通怪物
|
||||
case MonsterType.ELITE:
|
||||
return getMonList(HQuality.BLUE); // 蓝色品质为精英怪物
|
||||
return getMonList(QualitySet.BLUE); // 蓝色品质为精英怪物
|
||||
case MonsterType.BOSS:
|
||||
// 紫色及以上品质为Boss怪物
|
||||
const purpleMonsters = getMonList(HQuality.PURPLE);
|
||||
const orangeMonsters = getMonList(HQuality.ORANGE);
|
||||
const purpleMonsters = getMonList(QualitySet.PURPLE);
|
||||
const orangeMonsters = getMonList(QualitySet.ORANGE);
|
||||
return [...purpleMonsters, ...orangeMonsters];
|
||||
default:
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user