Compare commits

...

4 Commits

Author SHA1 Message Date
6aedb96342 优化 2025-12-06 20:52:40 +08:00
cd020e1240 Implement base damage calculation system for spells
- Add base and growth values to all 36 spells across heal_single, damage_single, damage_aoe, and heal_aoe categories in spells.php
- Map base values: heal [8, 18, 38, 65], fire [5, 12, 25, 45], ice [4, 10, 22, 42], thunder [6, 14, 28, 48], aoe damage [4-6, 10-14, 22-28, 42-48]
- Map growth rates: heal [0.8, 1.0, 1.2, 1.5], fire [0.6, 0.8, 1.0, 1.2], ice [0.5, 0.7, 0.95, 1.15], thunder [0.7, 0.9, 1.1, 1.3]
- Modify createSpell() in Item.php to calculate final base damage using formula: finalValue = base + (level * growth) + randomBonus(15%)
- All spells now generate with calculated base values that scale with level and quality tier
- This enables proper damage/healing scaling mechanics in combat system

Formula implementation:
- baseValue = spellInfo['base'][$qualityIndex]
- growth = spellInfo['growth'][$qualityIndex]
- randomBonus = rand(0, max(1, (int)($baseValue * 0.15)))
- finalBaseValue = (int)($baseValue + ($level * $growth) + $randomBonus)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 23:01:35 +08:00
82b6b27563 Implement comprehensive spell system with base damage and growth mechanics
- Add 5 spell templates (fire, ice, thunder, heal, defense) with base damage values and growth rates for 4 quality levels (common, rare, epic, legendary)
- Add base values and growth rates to 100+ spell configurations across all 13 maps and 39+ monsters
- Implement dynamic damage calculation: baseValue + (level * growth) + randomBonus
- Ensure all spells reference appropriate templates for proper scaling mechanics
- Follow cultivation stage progression (Qi Refinement → Foundation Establishment → Core Formation → Nascent Soul → Ascension)

This enables spells to scale dynamically with character level and quality tier, providing the foundation for implementing the damage calculation system in game code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 22:39:40 +08:00
46bf1e0195 为法术系统添加基础数值和属性机制
- 新增火系、冰系、雷系、治疗、防御五大法术模板
- 每个法术模板包含四个品质等级(common/rare/epic/legendary)的基础伤害值
- 添加成长值和随机属性(暴击率、暴击伤害)
- 为所有怪物的法术配置添加品质等级和对应模板
- 法术伤害将随着等级成长,且包含15%的随机属性波动
- 符合《凡人修仙传》的剧情设定,不同品质法术强度差异明显

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 22:05:54 +08:00
9 changed files with 832 additions and 436 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,11 +25,14 @@ class SpellDisplay
'crit_damage' => '暴击伤害系数影响伤害',
'crit_aoe' => '暴击率影响范围伤害',
'defense' => '基于防御属性',
'low_def_bonus' => '对低防御敌人伤害加成',
'matk_scaled' => '随敌人数量加成',
'def_pierce' => '防御穿透伤害',
'status_bonus' => '目标状态加成伤害',
'enemy_count_bonus' => '敌人数量加成伤害',
'dispersed_damage' => '伤害分散到所有敌人',
'smart_heal' => '智能治疗(优先低血量)',
'hp_missing' => '基于缺失生命值',
'low_def_bonus' => '对低防御敌人伤害加成',
'matk_scaled' => '随敌人数量加成',
'team_sync' => '基于队伍规模',
];
@ -122,9 +125,33 @@ class SpellDisplay
$typeName = self::getTypeName($spellType);
$parts[] = self::$gray . "[{$typeName}]" . self::$reset;
// 消耗和基本描述
// 计算方式
$calcType = $spell['calc_type'] ?? 'matk';
$calcDesc = self::getCalcTypeDescription($calcType);
$parts[] = self::$cyan . "{$calcDesc}" . self::$reset;
// 基础值
if ($spellType === 'damage_single' || $spellType === 'damage_aoe') {
$base = $spell['base'] ?? [5, 12, 25, 45];
$qualityIndex = self::getQualityIndex($spell['quality'] ?? 'common');
$baseValue = $base[$qualityIndex] ?? 5;
$parts[] = self::$yellow . "基础:{$baseValue}" . self::$reset;
} elseif ($spellType === 'heal_single' || $spellType === 'heal_aoe') {
$base = $spell['base'] ?? [8, 18, 38, 65];
$qualityIndex = self::getQualityIndex($spell['quality'] ?? 'common');
$baseValue = $base[$qualityIndex] ?? 8;
$parts[] = self::$yellow . "基础:{$baseValue}" . self::$reset;
}
// 消耗
$cost = $spell['cost'] ?? 0;
$parts[] = self::$cyan . "消耗:{$cost}" . self::$reset;
$enhanceLevel = $spell['enhanceLevel'] ?? 0;
$actualCost = max(1, $cost - ($enhanceLevel * 2));
if ($enhanceLevel > 0) {
$parts[] = self::$cyan . "消耗:{$actualCost}(原:{$cost})" . self::$reset;
} else {
$parts[] = self::$cyan . "消耗:{$cost}" . self::$reset;
}
return implode(" ", $parts);
}
@ -424,9 +451,10 @@ class SpellDisplay
// 第一行:槽位名 + 法术名
$lines[] = $linePrefix . self::$cyan . $slotName . self::$reset . ": " . self::formatName($spell);
// 计算方式
// 计算方式和法术类型
$calcType = $spell['calc_type'] ?? 'matk';
$spellType = $spell['spellType'] ?? $spell['type'] ?? 'unknown';
$typeName = self::getTypeName($spellType);
// 计算方式的完整描述
$calcTypeDescMap = [
@ -437,6 +465,9 @@ class SpellDisplay
'crit_heal' => '暴击治疗',
'crit_damage' => '暴击伤害',
'defense' => '基于防御',
'def_pierce' => '防御穿透',
'status_bonus' => '状态加成',
'enemy_count_bonus' => '敌人加成',
'low_def_bonus' => '克低防',
'matk_scaled' => '群体伤害',
'dispersed_damage' => '分散伤害',
@ -447,16 +478,33 @@ class SpellDisplay
];
$calcDesc = $calcTypeDescMap[$calcType] ?? $calcType;
$lines[] = $linePrefix . " " . self::$white . "计算: " . self::$green . $calcDesc . self::$reset;
$lines[] = $linePrefix . " " . self::$white . "类型: " . self::$magenta . $typeName . self::$reset .
self::$white . " | 计算: " . self::$green . $calcDesc . self::$reset;
// 显示基础数值
// 显示基础数值和倍数
if ($spellType === 'damage_single' || $spellType === 'damage_aoe') {
$ratio = $spell['damage_ratio'];
$lines[] = $linePrefix . " " . self::$white . "倍数: " . self::$yellow . "x{$ratio}" . self::$reset;
$base = $spell['base'] ?? [5, 12, 25, 45];
$qualityIndex = self::getQualityIndex($spell['quality'] ?? 'common');
$baseValue = $base[$qualityIndex] ?? 5;
$lines[] = $linePrefix . " " . self::$white . "倍数: " . self::$yellow . "x{$ratio}" . self::$reset .
self::$white . " | 基础值: " . self::$yellow . "{$baseValue}" . self::$reset;
} elseif ($spellType === 'heal_single' || $spellType === 'heal_aoe') {
$ratio = $spell['heal_ratio'];
$base = $spell['heal_base'];
$lines[] = $linePrefix . " " . self::$white . "治疗: " . self::$yellow . "x{$ratio} + {$base}" . self::$reset;
$healBase = $spell['heal_base'] ?? null;
$base = $spell['base'] ?? [8, 18, 38, 65];
$qualityIndex = self::getQualityIndex($spell['quality'] ?? 'common');
$baseValue = $base[$qualityIndex] ?? 8;
if ($healBase) {
$healBaseValue = $healBase[$qualityIndex] ?? 20;
$lines[] = $linePrefix . " " . self::$white . "倍数: " . self::$yellow . "x{$ratio}" . self::$reset .
self::$white . " | 基数: " . self::$yellow . "{$healBaseValue}" . self::$reset .
self::$white . " | 基础: " . self::$yellow . "{$baseValue}" . self::$reset;
} else {
$lines[] = $linePrefix . " " . self::$white . "倍数: " . self::$yellow . "x{$ratio}" . self::$reset .
self::$white . " | 基础值: " . self::$yellow . "{$baseValue}" . self::$reset;
}
}
// 显示消耗
@ -464,7 +512,9 @@ class SpellDisplay
$enhanceLevel = $spell['enhanceLevel'] ?? 0;
$actualCost = max(1, $cost - ($enhanceLevel * 2));
if ($enhanceLevel > 0) {
$lines[] = $linePrefix . " " . self::$white . "消耗: " . self::$yellow . "{$cost}" . self::$reset . "" . self::$green . "{$actualCost}" . self::$reset;
$lines[] = $linePrefix . " " . self::$white . "消耗: " . self::$yellow . "{$cost}" . self::$reset .
"" . self::$green . "{$actualCost}" . self::$reset .
self::$yellow . " +{$enhanceLevel}" . self::$reset;
} else {
$lines[] = $linePrefix . " " . self::$white . "消耗: " . self::$green . "{$actualCost}" . self::$reset;
}

View File

@ -10,6 +10,47 @@
* 第五章:化神期 (Lv.90-100)
*/
// ========== 通用法术模板 ==========
// 火系法术模板
$fireSpellTemplate = [
'base' => [5, 12, 25, 45], // common, rare, epic, legendary
'growth' => [0.6, 0.8, 1.0, 1.2],
'crit' => [0, 3, 8, 15],
'critdmg' => [0, 10, 25, 50],
];
// 冰系法术模板
$iceSpellTemplate = [
'base' => [4, 10, 22, 42],
'growth' => [0.5, 0.7, 0.95, 1.15],
'crit' => [0, 2, 6, 12],
'critdmg' => [0, 8, 20, 45],
];
// 雷系法术模板
$thunderSpellTemplate = [
'base' => [6, 14, 28, 48],
'growth' => [0.7, 0.9, 1.1, 1.3],
'crit' => [5, 8, 12, 20],
'critdmg' => [0, 12, 30, 60],
];
// 治疗法术模板
$healSpellTemplate = [
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1.0, 1.2, 1.5],
'crit' => [0, 0, 5, 10],
'critdmg' => [0, 0, 15, 30],
];
// 防御法术模板
$defenseSpellTemplate = [
'base' => [3, 8, 18, 35],
'growth' => [0.4, 0.6, 0.8, 1.0],
'crit' => [0, 0, 0, 5],
'critdmg' => [0, 0, 10, 20],
];
// ========== 通用装备模板 ==========
$weaponTemplate = [
'fixed_primary' => [
@ -107,10 +148,12 @@ return [
'spirit_stones' => 2,
'drops' => [
['type' => 'weapon', 'name' => '铁刀', 'rate' => 25] + $weaponTemplate,
['type' => 'armor', 'name' => '粗布衣', 'rate' => 15] + $armorTemplate,
['type' => 'consume', 'name' => '金疮药', 'rate' => 20, 'heal' => 30],
['type' => 'boots', 'name' => '布靴', 'rate' => 10] + $bootsTemplate,
],
'spells' => [
['id' => 10, 'name' => '柔拳', 'rate' => 25],
['id' => 10, 'name' => '柔拳', 'rate' => 25, 'quality' => 'common', 'base' => 5, 'growth' => 0.6] + $fireSpellTemplate,
],
'weight' => 60,
],
@ -126,11 +169,13 @@ return [
'spirit_stones' => 5,
'drops' => [
['type' => 'armor', 'name' => '皮甲', 'rate' => 25] + $armorTemplate,
['type' => 'ring', 'name' => '铁血戒', 'rate' => 15] + $ringTemplate,
['type' => 'consume', 'name' => '黄龙丹', 'rate' => 25, 'heal' => 50],
['type' => 'necklace', 'name' => '狼牙坠', 'rate' => 10] + $necklaceTemplate,
],
'spells' => [
['id' => 10, 'name' => '刀气切割', 'rate' => 20],
['id' => 20, 'name' => '寒冰爆裂', 'rate' => 25],
['id' => 10, 'name' => '刀气切割', 'rate' => 20, 'quality' => 'common', 'base' => 5, 'growth' => 0.6] + $fireSpellTemplate,
['id' => 20, 'name' => '寒冰爆裂', 'rate' => 25, 'quality' => 'rare', 'base' => 10, 'growth' => 0.7] + $iceSpellTemplate,
],
'minions' => [
['name' => '野狼帮帮众', 'hp' => 30, 'patk' => 5, 'matk' => 2, 'pdef' => 0, 'mdef' => 0, 'exp' => 10, 'count' => 2],
@ -150,12 +195,14 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '眨眼剑法', 'quality' => 'rare', 'patk' => 15, 'rate' => 15],
['type' => 'necklace', 'name' => '长生锁', 'rate' => 20] + $necklaceTemplate,
['type' => 'armor', 'name' => '疗愈大衣', 'quality' => 'rare', 'rate' => 12] + $armorTemplate,
['type' => 'ring', 'name' => '医道戒', 'rate' => 10] + $ringTemplate,
['type' => 'consume', 'name' => '清灵散', 'rate' => 40, 'heal' => 80],
],
'spells' => [
['id' => 1, 'name' => '妙手回春', 'rate' => 20],
['id' => 2, 'name' => '舍身救人', 'rate' => 25],
['id' => 30, 'name' => '集体治疗', 'rate' => 15],
['id' => 1, 'name' => '妙手回春', 'rate' => 20, 'quality' => 'rare', 'base' => 18, 'growth' => 1] + $healSpellTemplate,
['id' => 2, 'name' => '舍身救人', 'rate' => 25, 'quality' => 'rare', 'base' => 18, 'growth' => 1] + $healSpellTemplate,
['id' => 30, 'name' => '集体治疗', 'rate' => 15, 'quality' => 'rare', 'base' => 18, 'growth' => 1] + $healSpellTemplate,
],
'weight' => 10,
],
@ -178,11 +225,13 @@ return [
'spirit_stones' => 10,
'drops' => [
['type' => 'weapon', 'name' => '法器残片', 'rate' => 20] + $weaponTemplate,
['type' => 'ring', 'name' => '散修戒', 'rate' => 15] + $ringTemplate,
['type' => 'consume', 'name' => '辟谷丹', 'rate' => 20, 'heal' => 60],
['type' => 'boots', 'name' => '赶路靴', 'rate' => 10] + $bootsTemplate,
],
'spells' => [
['id' => 10, 'name' => '初级火焰术', 'rate' => 20],
['id' => 11, 'name' => '寒冰之术', 'rate' => 25],
['id' => 10, 'name' => '初级火焰术', 'rate' => 20, 'quality' => 'common', 'base' => 5, 'growth' => 0.6] + $fireSpellTemplate,
['id' => 11, 'name' => '寒冰之术', 'rate' => 25, 'quality' => 'rare', 'base' => 10, 'growth' => 0.7] + $iceSpellTemplate,
],
'weight' => 50,
],
@ -199,10 +248,12 @@ return [
'drops' => [
['type' => 'armor', 'name' => '青布衫', 'rate' => 20] + $armorTemplate,
['type' => 'boots', 'name' => '神行靴', 'rate' => 25] + $bootsTemplate,
['type' => 'weapon', 'name' => '守卫刀', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '守卫符', 'rate' => 10] + $necklaceTemplate,
],
'spells' => [
['id' => 10, 'name' => '火焰冲击', 'rate' => 20],
['id' => 30, 'name' => '防护光环', 'rate' => 25],
['id' => 10, 'name' => '火焰冲击', 'rate' => 20, 'quality' => 'common', 'base' => 5, 'growth' => 0.6] + $fireSpellTemplate,
['id' => 30, 'name' => '防护光环', 'rate' => 25, 'quality' => 'rare', 'base' => 8, 'growth' => 0.6] + $defenseSpellTemplate,
],
'weight' => 35,
],
@ -219,13 +270,15 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '青叶法器', 'quality' => 'rare', 'matk' => 25, 'rate' => 15],
['type' => 'ring', 'name' => '储物戒', 'rate' => 20] + $ringTemplate,
['type' => 'armor', 'name' => '青心甲', 'quality' => 'rare', 'rate' => 12] + $armorTemplate,
['type' => 'boots', 'name' => '云行履', 'rate' => 10] + $bootsTemplate,
['type' => 'consume', 'name' => '合气丹', 'rate' => 20, 'heal' => 100],
],
'spells' => [
['id' => 10, 'name' => '炎火术', 'rate' => 20],
['id' => 11, 'name' => '冰魄术', 'rate' => 25],
['id' => 12, 'name' => '雷刹术', 'rate' => 15],
['id' => 20, 'name' => '冰暴术', 'rate' => 20],
['id' => 10, 'name' => '炎火术', 'rate' => 20, 'quality' => 'common', 'base' => 5, 'growth' => 0.6] + $fireSpellTemplate,
['id' => 11, 'name' => '冰魄术', 'rate' => 25, 'quality' => 'rare', 'base' => 10, 'growth' => 0.7] + $iceSpellTemplate,
['id' => 12, 'name' => '雷刹术', 'rate' => 25, 'quality' => 'rare', 'base' => 14, 'growth' => 0.9] + $thunderSpellTemplate,
['id' => 20, 'name' => '冰暴术', 'rate' => 20, 'quality' => 'rare', 'base' => 10, 'growth' => 0.7] + $iceSpellTemplate,
],
'weight' => 15,
],
@ -248,10 +301,12 @@ return [
'spirit_stones' => 20,
'drops' => [
['type' => 'consume', 'name' => '紫猴花', 'rate' => 25, 'heal' => 120],
['type' => 'weapon', 'name' => '妖兽骨爪', 'rate' => 15] + $weaponTemplate,
['type' => 'armor', 'name' => '兽皮衣', 'rate' => 12] + $armorTemplate,
],
'spells' => [
['id' => 10, 'name' => '兽火喷射', 'rate' => 20],
['id' => 20, 'name' => '野兽嚎叫', 'rate' => 25],
['id' => 10, 'quality' => 'common', 'name' => '兽火喷射', 'rate' => 20, 'base' => 5, 'growth' => 0.6],
['id' => 20, 'quality' => 'rare', 'name' => '野兽嚎叫', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -268,11 +323,13 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '月刃', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '掩月法袍', 'rate' => 20] + $armorTemplate,
['type' => 'ring', 'name' => '月影戒', 'rate' => 12] + $ringTemplate,
['type' => 'necklace', 'name' => '月亮珠', 'rate' => 10] + $necklaceTemplate,
],
'spells' => [
['id' => 11, 'name' => '月影冰术', 'rate' => 20],
['id' => 20, 'name' => '月光雹', 'rate' => 25],
['id' => 1, 'name' => '月华治愈', 'rate' => 15],
['id' => 11, 'quality' => 'rare', 'name' => '月影冰术', 'rate' => 20, 'base' => 10, 'growth' => 0.7],
['id' => 20, 'quality' => 'rare', 'name' => '月光雹', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
['id' => 1, 'quality' => 'rare', 'name' => '月华治愈', 'rate' => 15, 'base' => 18, 'growth' => 1],
],
'weight' => 35,
],
@ -289,14 +346,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '金竺笔', 'quality' => 'epic', 'matk' => 45, 'rate' => 20],
['type' => 'armor', 'name' => '墨蛟甲', 'quality' => 'epic', 'pdef' => 20, 'mdef' => 15, 'rate' => 20],
['type' => 'necklace', 'name' => '蛟龙珠', 'quality' => 'rare', 'rate' => 15] + $necklaceTemplate,
['type' => 'boots', 'name' => '蛟龙靴', 'quality' => 'rare', 'rate' => 12] + $bootsTemplate,
['type' => 'consume', 'name' => '筑基丹', 'rate' => 50, 'heal' => 500],
],
'spells' => [
['id' => 11, 'name' => '墨液冰锥', 'rate' => 20],
['id' => 20, 'name' => '墨蛟冰雹', 'rate' => 25],
['id' => 22, 'name' => '墨影流星', 'rate' => 15],
['id' => 30, 'name' => '蛟龙防御', 'rate' => 20],
['id' => 1, 'name' => '生命恢复', 'rate' => 25],
['id' => 11, 'quality' => 'rare', 'name' => '墨液冰锥', 'rate' => 20, 'base' => 10, 'growth' => 0.7],
['id' => 20, 'quality' => 'rare', 'name' => '墨蛟冰雹', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
['id' => 22, 'quality' => 'epic', 'name' => '墨影流星', 'rate' => 15, 'base' => 22, 'growth' => 0.95],
['id' => 30, 'quality' => 'rare', 'name' => '蛟龙防御', 'rate' => 20, 'base' => 8, 'growth' => 0.6],
['id' => 1, 'quality' => 'rare', 'name' => '生命恢复', 'rate' => 25, 'base' => 18, 'growth' => 1],
],
'weight' => 15,
],
@ -322,11 +381,14 @@ return [
'spirit_stones' => 30,
'drops' => [
['type' => 'weapon', 'name' => '黄枫剑', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '黄枫弟子服', 'rate' => 18] + $armorTemplate,
['type' => 'ring', 'name' => '黄枫戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '黄龙丹', 'rate' => 20, 'heal' => 150],
['type' => 'boots', 'name' => '宗门靴', 'rate' => 10] + $bootsTemplate,
],
'spells' => [
['id' => 10, 'name' => '黄枫剑气', 'rate' => 20],
['id' => 30, 'name' => '枫叶守护', 'rate' => 25],
['id' => 10, 'quality' => 'common', 'name' => '黄枫剑气', 'rate' => 20, 'base' => 5, 'growth' => 0.6],
['id' => 30, 'quality' => 'rare', 'name' => '枫叶守护', 'rate' => 25, 'base' => 8, 'growth' => 0.6],
],
'weight' => 50,
],
@ -343,11 +405,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '执法甲', 'rate' => 20] + $armorTemplate,
['type' => 'boots', 'name' => '执法靴', 'rate' => 20] + $bootsTemplate,
['type' => 'weapon', 'name' => '执法剑', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '执法令', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 10, 'name' => '执法烈火', 'rate' => 20],
['id' => 20, 'name' => '冰雨惩罚', 'rate' => 25],
['id' => 30, 'name' => '铁血护盾', 'rate' => 15],
['id' => 10, 'quality' => 'common', 'name' => '执法烈火', 'rate' => 20, 'base' => 5, 'growth' => 0.6],
['id' => 20, 'quality' => 'rare', 'name' => '冰雨惩罚', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
['id' => 30, 'quality' => 'rare', 'name' => '铁血护盾', 'rate' => 15, 'base' => 8, 'growth' => 0.6],
],
'weight' => 35,
],
@ -364,14 +428,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '烈焰刀', 'quality' => 'epic', 'patk' => 50, 'matk' => 30, 'rate' => 15],
['type' => 'ring', 'name' => '传音符', 'rate' => 15] + $ringTemplate,
['type' => 'armor', 'name' => '烈焰战甲', 'quality' => 'rare', 'rate' => 12] + $armorTemplate,
['type' => 'boots', 'name' => '云游靴', 'quality' => 'rare', 'rate' => 10] + $bootsTemplate,
['type' => 'consume', 'name' => '定颜丹', 'rate' => 25, 'heal' => 800],
],
'spells' => [
['id' => 13, 'name' => '烈焰焚天', 'rate' => 20],
['id' => 22, 'name' => '流星雨击', 'rate' => 25],
['id' => 32, 'name' => '圣灵保护', 'rate' => 15],
['id' => 1, 'name' => '疗伤术', 'rate' => 20],
['id' => 30, 'name' => '大地庇护', 'rate' => 25],
['id' => 13, 'quality' => 'epic', 'name' => '烈焰焚天', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 22, 'quality' => 'epic', 'name' => '流星雨击', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 32, 'quality' => 'epic', 'name' => '圣灵保护', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 1, 'quality' => 'rare', 'name' => '疗伤术', 'rate' => 20, 'base' => 18, 'growth' => 1],
['id' => 30, 'quality' => 'rare', 'name' => '大地庇护', 'rate' => 25, 'base' => 8, 'growth' => 0.6],
],
'weight' => 15,
],
@ -394,11 +460,13 @@ return [
'spirit_stones' => 50,
'drops' => [
['type' => 'weapon', 'name' => '魔刃', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '魔道衣', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '魔力戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '血煞丹', 'rate' => 20, 'heal' => 200],
],
'spells' => [
['id' => 10, 'name' => '邪火燎原', 'rate' => 20],
['id' => 20, 'name' => '魔冰风暴', 'rate' => 25],
['id' => 10, 'quality' => 'common', 'name' => '邪火燎原', 'rate' => 20, 'base' => 5, 'growth' => 0.6],
['id' => 20, 'quality' => 'rare', 'name' => '魔冰风暴', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -415,11 +483,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '鬼灵衣', 'rate' => 20] + $armorTemplate,
['type' => 'necklace', 'name' => '聚魂珠', 'rate' => 20] + $necklaceTemplate,
['type' => 'weapon', 'name' => '鬼灵刀', 'rate' => 15] + $weaponTemplate,
['type' => 'boots', 'name' => '幽冥靴', 'rate' => 12] + $bootsTemplate,
],
'spells' => [
['id' => 11, 'name' => '冥界冰刺', 'rate' => 20],
['id' => 21, 'name' => '炎爆诅咒', 'rate' => 25],
['id' => 34, 'name' => '幽冥护盾', 'rate' => 15],
['id' => 11, 'quality' => 'rare', 'name' => '冥界冰刺', 'rate' => 20, 'base' => 10, 'growth' => 0.7],
['id' => 21, 'quality' => 'epic', 'name' => '炎爆诅咒', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 34, 'quality' => 'epic', 'name' => '幽冥护盾', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
],
'weight' => 35,
],
@ -436,14 +506,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '血灵钻', 'quality' => 'epic', 'matk' => 100, 'rate' => 15],
['type' => 'armor', 'name' => '血灵甲', 'quality' => 'epic', 'pdef' => 40, 'mdef' => 30, 'rate' => 15],
['type' => 'ring', 'name' => '王蝉戒', 'quality' => 'rare', 'rate' => 12] + $ringTemplate,
['type' => 'necklace', 'name' => '蝉鸣珠', 'quality' => 'rare', 'rate' => 10] + $necklaceTemplate,
['type' => 'consume', 'name' => '血灵丹', 'rate' => 20, 'heal' => 1000],
],
'spells' => [
['id' => 12, 'name' => '王蝉鸣雷', 'rate' => 20],
['id' => 23, 'name' => '灭世风暴', 'rate' => 25],
['id' => 24, 'name' => '末日火雨', 'rate' => 15],
['id' => 35, 'name' => '血魔复生', 'rate' => 20],
['id' => 4, 'name' => '生命泉涌', 'rate' => 25],
['id' => 12, 'quality' => 'rare', 'name' => '王蝉鸣雷', 'rate' => 20, 'base' => 14, 'growth' => 0.9],
['id' => 23, 'quality' => 'epic', 'name' => '灭世风暴', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 24, 'quality' => 'legendary', 'name' => '末日火雨', 'rate' => 15, 'base' => 42, 'growth' => 1.15],
['id' => 35, 'quality' => 'legendary', 'name' => '血魔复生', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 4, 'quality' => 'rare', 'name' => '生命泉涌', 'rate' => 25, 'base' => 18, 'growth' => 1],
],
'weight' => 15,
],
@ -467,10 +539,12 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '金瓜锤', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '金甲', 'rate' => 20] + $armorTemplate,
['type' => 'boots', 'name' => '禁卫靴', 'rate' => 15] + $bootsTemplate,
['type' => 'ring', 'name' => '皇家戒', 'rate' => 10] + $ringTemplate,
],
'spells' => [
['id' => 13, 'name' => '帝王烈焰', 'rate' => 20],
['id' => 30, 'name' => '皇权庇护', 'rate' => 25],
['id' => 13, 'quality' => 'epic', 'name' => '帝王烈焰', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 30, 'quality' => 'rare', 'name' => '皇权庇护', 'rate' => 25, 'base' => 8, 'growth' => 0.6],
],
'weight' => 50,
],
@ -486,12 +560,14 @@ return [
'spirit_stones' => 120,
'drops' => [
['type' => 'weapon', 'name' => '血刀', 'rate' => 18] + $weaponTemplate,
['type' => 'armor', 'name' => '黑煞衣', 'rate' => 15] + $armorTemplate,
['type' => 'necklace', 'name' => '血符', 'rate' => 12] + $necklaceTemplate,
['type' => 'consume', 'name' => '狂暴丹', 'rate' => 20, 'heal' => 400],
],
'spells' => [
['id' => 14, 'name' => '诛仙剑气', 'rate' => 20],
['id' => 24, 'name' => '末日炼狱', 'rate' => 25],
['id' => 35, 'name' => '血魂同盟', 'rate' => 15],
['id' => 14, 'quality' => 'epic', 'name' => '诛仙剑气', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 24, 'quality' => 'legendary', 'name' => '末日炼狱', 'rate' => 25, 'base' => 42, 'growth' => 1.15],
['id' => 35, 'quality' => 'legendary', 'name' => '血魂同盟', 'rate' => 15, 'base' => 35, 'growth' => 1],
],
'weight' => 35,
],
@ -507,15 +583,17 @@ return [
'spirit_stones' => 400,
'drops' => [
['type' => 'weapon', 'name' => '青元剑', 'quality' => 'legendary', 'patk' => 100, 'matk' => 80, 'rate' => 20],
['type' => 'consume', 'name' => '虚天鼎碎片', 'rate' => 25, 'heal' => 2000], // 剧情物品作为高回复药
['type' => 'armor', 'name' => '黑煞甲', 'quality' => 'legendary', 'rate' => 18] + $armorTemplate,
['type' => 'ring', 'name' => '黑煞戒', 'rate' => 15] + $ringTemplate,
['type' => 'boots', 'name' => '黑煞靴', 'quality' => 'rare', 'rate' => 12] + $bootsTemplate,
['type' => 'consume', 'name' => '虚天鼎碎片', 'rate' => 25, 'heal' => 2000],
],
'spells' => [
['id' => 15, 'name' => '狂暴邪斩', 'rate' => 20],
['id' => 25, 'name' => '狂风灭世', 'rate' => 25],
['id' => 33, 'name' => '仙界诅咒', 'rate' => 15],
['id' => 35, 'name' => '血煞永生', 'rate' => 20],
['id' => 6, 'name' => '暗夜疗愈', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '狂暴邪斩', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 25, 'quality' => 'legendary', 'name' => '狂风灭世', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 33, 'quality' => 'epic', 'name' => '仙界诅咒', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 35, 'quality' => 'legendary', 'name' => '血煞永生', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 6, 'quality' => 'epic', 'name' => '暗夜疗愈', 'rate' => 25, 'base' => 38, 'growth' => 1.2],
],
'weight' => 15,
],
@ -541,11 +619,13 @@ return [
'spirit_stones' => 150,
'drops' => [
['type' => 'weapon', 'name' => '骨棒', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '海兽皮衣', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '海猿戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '海灵液', 'rate' => 20, 'heal' => 500],
],
'spells' => [
['id' => 20, 'name' => '海洋冰雹', 'rate' => 20],
['id' => 25, 'name' => '波涛斩击', 'rate' => 25],
['id' => 20, 'quality' => 'rare', 'name' => '海洋冰雹', 'rate' => 20, 'base' => 10, 'growth' => 0.7],
['id' => 25, 'quality' => 'legendary', 'name' => '波涛斩击', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
],
'weight' => 50,
],
@ -562,10 +642,12 @@ return [
'drops' => [
['type' => 'armor', 'name' => '鱼鳞甲', 'rate' => 20] + $armorTemplate,
['type' => 'necklace', 'name' => '避水珠', 'rate' => 20] + $necklaceTemplate,
['type' => 'weapon', 'name' => '鲤鱼剑', 'rate' => 15] + $weaponTemplate,
['type' => 'boots', 'name' => '水行靴', 'rate' => 12] + $bootsTemplate,
],
'spells' => [
['id' => 21, 'name' => '炎爆水雾', 'rate' => 20],
['id' => 30, 'name' => '水灵庇护', 'rate' => 25],
['id' => 21, 'quality' => 'epic', 'name' => '炎爆水雾', 'rate' => 20, 'base' => 22, 'growth' => 0.95],
['id' => 30, 'quality' => 'rare', 'name' => '水灵庇护', 'rate' => 25, 'base' => 8, 'growth' => 0.6],
],
'weight' => 35,
],
@ -582,13 +664,15 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '引魂钟', 'quality' => 'epic', 'matk' => 200, 'rate' => 15],
['type' => 'boots', 'name' => '踏浪靴', 'rate' => 20] + $bootsTemplate,
['type' => 'armor', 'name' => '海皇甲', 'quality' => 'rare', 'rate' => 12] + $armorTemplate,
['type' => 'necklace', 'name' => '海皇珠', 'quality' => 'rare', 'rate' => 10] + $necklaceTemplate,
['type' => 'consume', 'name' => '降尘丹', 'rate' => 25, 'heal' => 1500],
],
'spells' => [
['id' => 22, 'name' => '水系流星', 'rate' => 20],
['id' => 23, 'name' => '沧海风暴', 'rate' => 25],
['id' => 35, 'name' => '灵魂共鸣', 'rate' => 15],
['id' => 31, 'name' => '海王光环', 'rate' => 20],
['id' => 22, 'quality' => 'epic', 'name' => '水系流星', 'rate' => 20, 'base' => 22, 'growth' => 0.95],
['id' => 23, 'quality' => 'epic', 'name' => '沧海风暴', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 35, 'quality' => 'legendary', 'name' => '灵魂共鸣', 'rate' => 15, 'base' => 35, 'growth' => 1],
['id' => 31, 'quality' => 'rare', 'name' => '海王光环', 'rate' => 20, 'base' => 8, 'growth' => 0.6],
],
'weight' => 15,
],
@ -611,11 +695,13 @@ return [
'spirit_stones' => 300,
'drops' => [
['type' => 'weapon', 'name' => '傀儡弓', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '傀儡甲', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '傀儡戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '灵石乳', 'rate' => 20, 'heal' => 800],
],
'spells' => [
['id' => 12, 'name' => '傀儡雷击', 'rate' => 20],
['id' => 30, 'name' => '机械护盾', 'rate' => 25],
['id' => 12, 'quality' => 'rare', 'name' => '傀儡雷击', 'rate' => 20, 'base' => 14, 'growth' => 0.9],
['id' => 30, 'quality' => 'rare', 'name' => '机械护盾', 'rate' => 25, 'base' => 8, 'growth' => 0.6],
],
'weight' => 50,
],
@ -632,11 +718,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '灵力护盾', 'rate' => 20] + $armorTemplate,
['type' => 'ring', 'name' => '分身戒', 'rate' => 20] + $ringTemplate,
['type' => 'weapon', 'name' => '分身剑', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '分身珠', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 14, 'name' => '剑仙降临', 'rate' => 20],
['id' => 23, 'name' => '灭世寂灭', 'rate' => 25],
['id' => 32, 'name' => '圣灵恩惠', 'rate' => 15],
['id' => 14, 'quality' => 'epic', 'name' => '剑仙降临', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 23, 'quality' => 'epic', 'name' => '灭世寂灭', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 32, 'quality' => 'epic', 'name' => '圣灵恩惠', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
],
'weight' => 35,
],
@ -654,13 +742,15 @@ return [
['type' => 'weapon', 'name' => '天都尸火', 'quality' => 'legendary', 'matk' => 300, 'rate' => 20],
['type' => 'consume', 'name' => '补天丹', 'rate' => 25, 'heal' => 3000],
['type' => 'necklace', 'name' => '虚天鼎', 'quality' => 'legendary', 'hp' => 2000, 'rate' => 5],
['type' => 'armor', 'name' => '极阴甲', 'quality' => 'epic', 'rate' => 12] + $armorTemplate,
['type' => 'boots', 'name' => '极阴靴', 'quality' => 'rare', 'rate' => 10] + $bootsTemplate,
],
'spells' => [
['id' => 15, 'name' => '极阴邪斩', 'rate' => 20],
['id' => 24, 'name' => '末世冰狱', 'rate' => 25],
['id' => 33, 'name' => '仙界救赎', 'rate' => 15],
['id' => 35, 'name' => '永恒诅咒', 'rate' => 20],
['id' => 3, 'name' => '活力恢复', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '极阴邪斩', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 24, 'quality' => 'legendary', 'name' => '末世冰狱', 'rate' => 25, 'base' => 42, 'growth' => 1.15],
['id' => 33, 'quality' => 'epic', 'name' => '仙界救赎', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 35, 'quality' => 'legendary', 'name' => '永恒诅咒', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 3, 'quality' => 'epic', 'name' => '活力恢复', 'rate' => 25, 'base' => 38, 'growth' => 1.2],
],
'weight' => 15,
],
@ -683,11 +773,13 @@ return [
'spirit_stones' => 600,
'drops' => [
['type' => 'weapon', 'name' => '妖骨剑', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '妖兽皮甲', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '妖兽戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '妖丹', 'rate' => 40, 'heal' => 1000],
],
'spells' => [
['id' => 11, 'name' => '妖冰刃', 'rate' => 20],
['id' => 20, 'name' => '妖兽雹', 'rate' => 25],
['id' => 11, 'quality' => 'rare', 'name' => '妖冰刃', 'rate' => 20, 'base' => 10, 'growth' => 0.7],
['id' => 20, 'quality' => 'rare', 'name' => '妖兽雹', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -704,11 +796,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '雷鲸皮', 'rate' => 20] + $armorTemplate,
['type' => 'boots', 'name' => '风雷靴', 'rate' => 20] + $bootsTemplate,
['type' => 'weapon', 'name' => '雷鲸钗', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '雷珠', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 12, 'name' => '雷鲸怒雷', 'rate' => 20],
['id' => 21, 'name' => '风暴洪流', 'rate' => 25],
['id' => 34, 'name' => '深海护盾', 'rate' => 15],
['id' => 12, 'quality' => 'rare', 'name' => '雷鲸怒雷', 'rate' => 20, 'base' => 14, 'growth' => 0.9],
['id' => 21, 'quality' => 'epic', 'name' => '风暴洪流', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 34, 'quality' => 'epic', 'name' => '深海护盾', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
],
'weight' => 35,
],
@ -725,14 +819,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '金蛟剪', 'quality' => 'legendary', 'patk' => 300, 'matk' => 200, 'rate' => 20],
['type' => 'armor', 'name' => '金蛟鳞甲', 'quality' => 'legendary', 'pdef' => 180, 'mdef' => 120, 'rate' => 20],
['type' => 'necklace', 'name' => '金蛟珠', 'quality' => 'epic', 'rate' => 15] + $necklaceTemplate,
['type' => 'boots', 'name' => '金蛟靴', 'quality' => 'rare', 'rate' => 12] + $bootsTemplate,
['type' => 'consume', 'name' => '九曲灵参', 'rate' => 25, 'heal' => 5000],
],
'spells' => [
['id' => 15, 'name' => '蛟龙狂暴', 'rate' => 20],
['id' => 25, 'name' => '雷风灭世', 'rate' => 25],
['id' => 33, 'name' => '龙王救赎', 'rate' => 15],
['id' => 35, 'name' => '蛟龙之力', 'rate' => 20],
['id' => 2, 'name' => '生命转移', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '蛟龙狂暴', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 25, 'quality' => 'legendary', 'name' => '雷风灭世', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 33, 'quality' => 'epic', 'name' => '龙王救赎', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 35, 'quality' => 'legendary', 'name' => '蛟龙之力', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 2, 'quality' => 'rare', 'name' => '生命转移', 'rate' => 25, 'base' => 18, 'growth' => 1],
],
'weight' => 15,
],
@ -758,11 +854,13 @@ return [
'spirit_stones' => 800,
'drops' => [
['type' => 'weapon', 'name' => '狼牙匕', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '狼皮衣', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '银月戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '灵液', 'rate' => 20, 'heal' => 1200],
],
'spells' => [
['id' => 10, 'name' => '狼焰咆哮', 'rate' => 20],
['id' => 20, 'name' => '月光寒冰', 'rate' => 25],
['id' => 10, 'quality' => 'common', 'name' => '狼焰咆哮', 'rate' => 20, 'base' => 5, 'growth' => 0.6],
['id' => 20, 'quality' => 'rare', 'name' => '月光寒冰', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -779,11 +877,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '长老法袍', 'rate' => 20] + $armorTemplate,
['type' => 'ring', 'name' => '长老戒', 'rate' => 20] + $ringTemplate,
['type' => 'weapon', 'name' => '长老杖', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '长老令', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 13, 'name' => '长老烈焰', 'rate' => 20],
['id' => 22, 'name' => '宗门流星', 'rate' => 25],
['id' => 31, 'name' => '宗门护盾', 'rate' => 15],
['id' => 13, 'quality' => 'epic', 'name' => '长老烈焰', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 22, 'quality' => 'epic', 'name' => '宗门流星', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 31, 'quality' => 'rare', 'name' => '宗门护盾', 'rate' => 15, 'base' => 8, 'growth' => 0.6],
],
'weight' => 35,
],
@ -800,14 +900,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '落云剑', 'quality' => 'epic', 'patk' => 350, 'matk' => 250, 'rate' => 15],
['type' => 'necklace', 'name' => '定魂珠', 'rate' => 20] + $necklaceTemplate,
['type' => 'armor', 'name' => '云中甲', 'quality' => 'rare', 'rate' => 12] + $armorTemplate,
['type' => 'boots', 'name' => '飘云靴', 'quality' => 'rare', 'rate' => 10] + $bootsTemplate,
['type' => 'consume', 'name' => '培婴丹', 'rate' => 25, 'heal' => 3000],
],
'spells' => [
['id' => 14, 'name' => '剑仙之意', 'rate' => 20],
['id' => 24, 'name' => '风云诀', 'rate' => 25],
['id' => 33, 'name' => '救赎之力', 'rate' => 15],
['id' => 2, 'name' => '生命同盟', 'rate' => 20],
['id' => 32, 'name' => '圣灵护佑', 'rate' => 25],
['id' => 14, 'quality' => 'epic', 'name' => '剑仙之意', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 24, 'quality' => 'legendary', 'name' => '风云诀', 'rate' => 25, 'base' => 42, 'growth' => 1.15],
['id' => 33, 'quality' => 'epic', 'name' => '救赎之力', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 2, 'quality' => 'rare', 'name' => '生命同盟', 'rate' => 20, 'base' => 18, 'growth' => 1],
['id' => 32, 'quality' => 'epic', 'name' => '圣灵护佑', 'rate' => 25, 'base' => 18, 'growth' => 0.8],
],
'weight' => 15,
],
@ -830,11 +932,13 @@ return [
'spirit_stones' => 1200,
'drops' => [
['type' => 'weapon', 'name' => '魔魂刀', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '魔魂衣', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '魔魂戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '魔髓钻', 'rate' => 15, 'heal' => 2000],
],
'spells' => [
['id' => 14, 'name' => '古魔剑意', 'rate' => 20],
['id' => 21, 'name' => '魔火爆裂', 'rate' => 25],
['id' => 14, 'quality' => 'epic', 'name' => '古魔剑意', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 21, 'quality' => 'epic', 'name' => '魔火爆裂', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
],
'weight' => 50,
],
@ -851,11 +955,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '太乙银精甲', 'rate' => 20] + $armorTemplate,
['type' => 'boots', 'name' => '虚空靴', 'rate' => 20] + $bootsTemplate,
['type' => 'weapon', 'name' => '空间刃', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '虚空珠', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 23, 'name' => '空间风暴', 'rate' => 20],
['id' => 35, 'name' => '虚空之力', 'rate' => 25],
['id' => 30, 'name' => '空间护盾', 'rate' => 15],
['id' => 23, 'quality' => 'epic', 'name' => '空间风暴', 'rate' => 20, 'base' => 22, 'growth' => 0.95],
['id' => 35, 'quality' => 'legendary', 'name' => '虚空之力', 'rate' => 25, 'base' => 35, 'growth' => 1],
['id' => 30, 'quality' => 'rare', 'name' => '空间护盾', 'rate' => 15, 'base' => 8, 'growth' => 0.6],
],
'weight' => 35,
],
@ -872,14 +978,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '黑风旗', 'quality' => 'legendary', 'matk' => 800, 'rate' => 20],
['type' => 'armor', 'name' => '魔龙甲', 'quality' => 'legendary', 'pdef' => 350, 'mdef' => 250, 'rate' => 20],
['type' => 'necklace', 'name' => '魔龙珠', 'quality' => 'epic', 'rate' => 15] + $necklaceTemplate,
['type' => 'boots', 'name' => '魔龙靴', 'quality' => 'rare', 'rate' => 12] + $bootsTemplate,
['type' => 'consume', 'name' => '万年灵乳', 'rate' => 15, 'heal' => 8000],
],
'spells' => [
['id' => 15, 'name' => '古魔灭世', 'rate' => 20],
['id' => 25, 'name' => '狂风魔力', 'rate' => 25],
['id' => 34, 'name' => '古魔护盾', 'rate' => 15],
['id' => 35, 'name' => '魔界永恒', 'rate' => 20],
['id' => 4, 'name' => '魔泉生命', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '古魔灭世', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 25, 'quality' => 'legendary', 'name' => '狂风魔力', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 34, 'quality' => 'epic', 'name' => '古魔护盾', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 35, 'quality' => 'legendary', 'name' => '魔界永恒', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 4, 'quality' => 'rare', 'name' => '魔泉生命', 'rate' => 25, 'base' => 18, 'growth' => 1],
],
'weight' => 15,
],
@ -905,11 +1013,13 @@ return [
'spirit_stones' => 2000,
'drops' => [
['type' => 'weapon', 'name' => '晶砖', 'rate' => 20] + $weaponTemplate,
['type' => 'armor', 'name' => '灵晶甲', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '晶体戒', 'rate' => 12] + $ringTemplate,
['type' => 'consume', 'name' => '灵烛果', 'rate' => 20, 'heal' => 3000],
],
'spells' => [
['id' => 13, 'name' => '晶体烈焰', 'rate' => 20],
['id' => 20, 'name' => '灵山冰雹', 'rate' => 25],
['id' => 13, 'quality' => 'epic', 'name' => '晶体烈焰', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 20, 'quality' => 'rare', 'name' => '灵山冰雹', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -926,11 +1036,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '银翅甲', 'rate' => 20] + $armorTemplate,
['type' => 'necklace', 'name' => '夜叉链', 'rate' => 20] + $necklaceTemplate,
['type' => 'weapon', 'name' => '夜叉叉', 'rate' => 15] + $weaponTemplate,
['type' => 'boots', 'name' => '夜叉靴', 'rate' => 12] + $bootsTemplate,
],
'spells' => [
['id' => 14, 'name' => '夜叉剑术', 'rate' => 20],
['id' => 23, 'name' => '虚空风暴', 'rate' => 25],
['id' => 35, 'name' => '天罚之力', 'rate' => 15],
['id' => 14, 'quality' => 'epic', 'name' => '夜叉剑术', 'rate' => 20, 'base' => 25, 'growth' => 1],
['id' => 23, 'quality' => 'epic', 'name' => '虚空风暴', 'rate' => 25, 'base' => 22, 'growth' => 0.95],
['id' => 35, 'quality' => 'legendary', 'name' => '天罚之力', 'rate' => 15, 'base' => 35, 'growth' => 1],
],
'weight' => 35,
],
@ -947,14 +1059,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '八灵尺', 'quality' => 'legendary', 'matk' => 1200, 'rate' => 20],
['type' => 'ring', 'name' => '雪晶珠', 'quality' => 'legendary', 'crit' => 15, 'rate' => 20],
['type' => 'armor', 'name' => '圣祖甲', 'quality' => 'epic', 'rate' => 15] + $armorTemplate,
['type' => 'necklace', 'name' => '圣祖链', 'quality' => 'epic', 'rate' => 12] + $necklaceTemplate,
['type' => 'consume', 'name' => '回阳水', 'rate' => 25, 'heal' => 10000],
],
'spells' => [
['id' => 15, 'name' => '元刹灭世', 'rate' => 20],
['id' => 25, 'name' => '永恒灭亡', 'rate' => 25],
['id' => 33, 'name' => '圣祖救赎', 'rate' => 15],
['id' => 34, 'name' => '永生护盾', 'rate' => 20],
['id' => 5, 'name' => '暴击疗愈', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '元刹灭世', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 25, 'quality' => 'legendary', 'name' => '永恒灭亡', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 33, 'quality' => 'epic', 'name' => '圣祖救赎', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 34, 'quality' => 'epic', 'name' => '永生护盾', 'rate' => 20, 'base' => 18, 'growth' => 0.8],
['id' => 5, 'quality' => 'epic', 'name' => '暴击疗愈', 'rate' => 25, 'base' => 38, 'growth' => 1.2],
],
'weight' => 15,
],
@ -978,10 +1092,12 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '虚空爪', 'rate' => 20] + $weaponTemplate,
['type' => 'boots', 'name' => '破空靴', 'rate' => 20] + $bootsTemplate,
['type' => 'armor', 'name' => '虚空衣', 'rate' => 15] + $armorTemplate,
['type' => 'ring', 'name' => '虚空戒', 'rate' => 12] + $ringTemplate,
],
'spells' => [
['id' => 12, 'name' => '虚空雷击', 'rate' => 20],
['id' => 20, 'name' => '虚空冰雹', 'rate' => 25],
['id' => 12, 'quality' => 'rare', 'name' => '虚空雷击', 'rate' => 20, 'base' => 14, 'growth' => 0.9],
['id' => 20, 'quality' => 'rare', 'name' => '虚空冰雹', 'rate' => 25, 'base' => 10, 'growth' => 0.7],
],
'weight' => 50,
],
@ -998,11 +1114,13 @@ return [
'drops' => [
['type' => 'armor', 'name' => '风暴甲', 'rate' => 20] + $armorTemplate,
['type' => 'consume', 'name' => '空间晶石', 'rate' => 20, 'heal' => 5000],
['type' => 'weapon', 'name' => '风暴剑', 'rate' => 15] + $weaponTemplate,
['type' => 'necklace', 'name' => '风暴珠', 'rate' => 12] + $necklaceTemplate,
],
'spells' => [
['id' => 23, 'name' => '灭世空间', 'rate' => 20],
['id' => 25, 'name' => '永恒风暴', 'rate' => 25],
['id' => 35, 'name' => '空间之力', 'rate' => 15],
['id' => 23, 'quality' => 'epic', 'name' => '灭世空间', 'rate' => 20, 'base' => 22, 'growth' => 0.95],
['id' => 25, 'quality' => 'legendary', 'name' => '永恒风暴', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 35, 'quality' => 'legendary', 'name' => '空间之力', 'rate' => 15, 'base' => 35, 'growth' => 1],
],
'weight' => 35,
],
@ -1019,14 +1137,16 @@ return [
'drops' => [
['type' => 'weapon', 'name' => '青竹蜂云剑', 'quality' => 'legendary', 'patk' => 1500, 'matk' => 1000, 'rate' => 15],
['type' => 'armor', 'name' => '五行甲', 'quality' => 'legendary', 'pdef' => 1000, 'mdef' => 1000, 'rate' => 15],
['type' => 'consume', 'name' => '飞升令', 'rate' => 25, 'heal' => 99999], // 象征性物品
['type' => 'necklace', 'name' => '凤凰链', 'quality' => 'legendary', 'rate' => 12] + $necklaceTemplate,
['type' => 'boots', 'name' => '凤凰靴', 'quality' => 'epic', 'rate' => 10] + $bootsTemplate,
['type' => 'consume', 'name' => '飞升令', 'rate' => 25, 'heal' => 99999],
],
'spells' => [
['id' => 15, 'name' => '凤凰灭世', 'rate' => 20],
['id' => 25, 'name' => '冰凤风暴', 'rate' => 25],
['id' => 33, 'name' => '永恒救赎', 'rate' => 15],
['id' => 35, 'name' => '凤凰之力', 'rate' => 20],
['id' => 6, 'name' => '援护之术', 'rate' => 25],
['id' => 15, 'quality' => 'legendary', 'name' => '凤凰灭世', 'rate' => 20, 'base' => 45, 'growth' => 1.2],
['id' => 25, 'quality' => 'legendary', 'name' => '冰凤风暴', 'rate' => 25, 'base' => 48, 'growth' => 1.3],
['id' => 33, 'quality' => 'epic', 'name' => '永恒救赎', 'rate' => 15, 'base' => 18, 'growth' => 0.8],
['id' => 35, 'quality' => 'legendary', 'name' => '凤凰之力', 'rate' => 20, 'base' => 35, 'growth' => 1],
['id' => 6, 'quality' => 'epic', 'name' => '援护之术', 'rate' => 25, 'base' => 38, 'growth' => 1.2],
],
'weight' => 15,
],

View File

@ -21,17 +21,22 @@ return [
// 品质参数:[common, rare, epic, legendary]
'heal_ratio' => [0.5, 0.8, 1.2, 1.8], // 魔攻倍数
'heal_base' => [20, 40, 70, 120], // 基础治疗值
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
// 2. 及时救难 - 生命值百分比型 (恢复 = 自己最大生命值 × 百分比)
// 2. 强击疗法 - 物攻型 (恢复 = 物攻 × 倍数 + 基础值)
2 => [
'name' => '及时救难',
'name' => '强击疗法',
'type' => 'heal_single',
'calc_type' => 'hp_percent', // 计算方式:最大生命值百分比
'cost' => 20,
'level_req' => 5,
'desc' => '将自己的部分生命值转移给队友',
'heal_ratio' => [0.3, 0.4, 0.5, 0.6], // 最大生命值百分比
'calc_type' => 'patk', // 计算方式:纯物攻
'cost' => 18,
'level_req' => 3,
'desc' => '通过强劲的气血运行来治疗,效果与物攻相关',
'heal_ratio' => [0.4, 0.65, 0.95, 1.4], // 物攻倍数
'heal_base' => [15, 30, 55, 90], // 基础治疗值
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
// 3. 活力术 - 混合型 (恢复 = (魔攻 + 物攻) × 倍数 + 基础值)
@ -44,33 +49,25 @@ return [
'desc' => '结合物理和魔法的治疗法术',
'heal_ratio' => [0.3, 0.5, 0.7, 1.0], // (魔攻+物攻) 倍数
'heal_base' => [15, 30, 50, 80],
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
// 4. 生命之泉 - 基于当前生命值缺口 (恢复 = 缺失血量 × 百分比)
// 4. 及时救难 - 生命值百分比型 (恢复 = 自己最大生命值 × 百分比)
4 => [
'name' => '生命之泉',
'name' => '及时救难',
'type' => 'heal_single',
'calc_type' => 'hp_missing', // 计算方式:缺失生命值百分比
'cost' => 30,
'level_req' => 18,
'desc' => '根据队友缺失的生命值比例进行治疗',
'heal_ratio' => [0.4, 0.55, 0.7, 0.85], // 缺失生命值百分比
'calc_type' => 'hp_percent', // 计算方式:最大生命值百分比
'cost' => 20,
'level_req' => 5,
'desc' => '将自己的部分生命值转移给队友',
'heal_ratio' => [0.3, 0.4, 0.5, 0.6], // 最大生命值百分比
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
// 5. 暴击治疗 - 与暴击率相关 (恢复 = 魔攻 × 倍数 × (1 + 暴击率×特殊系数))
// 5. 援护术 - 基于防御属性 (恢复 = (物防+魔防) × 倍数 + 固定值)
5 => [
'name' => '暴击治疗',
'type' => 'heal_single',
'calc_type' => 'crit_heal', // 计算方式:与暴击率相关
'cost' => 28,
'level_req' => 22,
'desc' => '暴击率越高,治疗效果越强',
'heal_ratio' => [0.4, 0.65, 0.95, 1.4], // 基础魔攻倍数
'crit_bonus' => [0.5, 0.7, 1.0, 1.5], // 暴击率加成系数
],
// 6. 援护术 - 基于防御属性 (恢复 = (物防+魔防) × 倍数 + 固定值)
6 => [
'name' => '援护术',
'type' => 'heal_single',
'calc_type' => 'defense', // 计算方式:基于防御属性
@ -79,6 +76,22 @@ return [
'desc' => '根据防御力进行治疗,防御越高效果越好',
'heal_ratio' => [0.8, 1.2, 1.8, 2.5], // (物防+魔防) 倍数
'heal_base' => [10, 20, 35, 60],
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
// 6. 暴击治疗 - 与暴击率相关 (恢复 = 魔攻 × 倍数 × (1 + 暴击率×特殊系数))
6 => [
'name' => '暴击治疗',
'type' => 'heal_single',
'calc_type' => 'crit_heal', // 计算方式:与暴击率相关
'cost' => 28,
'level_req' => 22,
'desc' => '暴击率越高,治疗效果越强',
'heal_ratio' => [0.4, 0.65, 0.95, 1.4], // 基础魔攻倍数
'crit_bonus' => [0.5, 0.7, 1.0, 1.5], // 暴击率加成系数
'base' => [8, 18, 38, 65], // 基础伤害值
'growth' => [0.8, 1.0, 1.2, 1.5], // 等级成长系数
],
],
@ -93,32 +106,25 @@ return [
'level_req' => 1,
'desc' => '发出一团火球,对单个敌人造成伤害',
'damage_ratio' => [1.2, 1.6, 2.0, 2.6],
'base' => [5, 12, 25, 45], // 基础伤害值
'growth' => [0.6, 0.8, 1.0, 1.2], // 等级成长系数
],
// 11. 冰锥术 - 魔攻型
// 11. 剑刃风暴 - 物攻型 (伤害 = 物攻 × 倍数)
11 => [
'name' => '冰锥术',
'type' => 'damage_single',
'calc_type' => 'matk',
'cost' => 22,
'level_req' => 6,
'desc' => '凝聚寒冰之力,发出锐利冰锥',
'damage_ratio' => [1.3, 1.8, 2.2, 3.0],
],
// 12. 雷击术 - 物攻型 (伤害 = 物攻 × 倍数)
12 => [
'name' => '雷击术',
'name' => '剑刃风暴',
'type' => 'damage_single',
'calc_type' => 'patk',
'cost' => 24,
'level_req' => 10,
'desc' => '召唤雷电直击单个敌人,与物攻相关',
'damage_ratio' => [1.4, 1.9, 2.3, 3.2],
'cost' => 20,
'level_req' => 2,
'desc' => '旋转剑刃造成锋利的伤害',
'damage_ratio' => [1.1, 1.5, 1.9, 2.5],
'base' => [6, 14, 28, 48], // 基础伤害值
'growth' => [0.7, 0.9, 1.1, 1.3], // 等级成长系数
],
// 13. 烈焰焚天 - 混合型 (伤害 = (魔攻 + 物攻) × 倍数)
13 => [
// 12. 烈焰焚天 - 混合型 (伤害 = (魔攻 + 物攻) × 倍数)
12 => [
'name' => '烈焰焚天',
'type' => 'damage_single',
'calc_type' => 'hybrid',
@ -126,9 +132,25 @@ return [
'level_req' => 18,
'desc' => '释放强大的火焰,伤害与双攻相关',
'damage_ratio' => [0.8, 1.1, 1.5, 2.0],
'base' => [5, 12, 25, 45], // 基础伤害值
'growth' => [0.6, 0.8, 1.0, 1.2], // 等级成长系数
],
// 14. 诛仙剑气 - 物攻 + 暴击型 (伤害 = 物攻 × 倍数 × (1 + 暴击伤害系数))
// 13. 冰锥术 - 防御穿透型 (伤害 = 魔攻 × 倍数 × (1 + 敌人防御缺陷系数))
13 => [
'name' => '冰锥术',
'type' => 'damage_single',
'calc_type' => 'def_pierce',
'cost' => 22,
'level_req' => 6,
'desc' => '凝聚寒冰之力穿透敌人防御',
'damage_ratio' => [1.3, 1.8, 2.2, 3.0],
'pierce_bonus' => [0.2, 0.3, 0.45, 0.6], // 防御穿透系数
'base' => [4, 10, 22, 42], // 基础伤害值
'growth' => [0.5, 0.7, 0.95, 1.15], // 等级成长系数
],
// 14. 诛仙剑气 - 暴击伤害型 (伤害 = 物攻 × 倍数 × (1 + 暴击伤害系数))
14 => [
'name' => '诛仙剑气',
'type' => 'damage_single',
@ -138,17 +160,22 @@ return [
'desc' => '凝聚剑意,暴击伤害系数越高效果越强',
'damage_ratio' => [1.5, 2.0, 2.6, 3.5],
'crit_dmg_bonus' => [0.3, 0.5, 0.8, 1.2], // 暴击伤害加成系数
'base' => [5, 12, 25, 45], // 基础伤害值
'growth' => [0.6, 0.8, 1.0, 1.2], // 等级成长系数
],
// 15. 狂暴斩 - 低防御有加成 (伤害 = 物攻 × 倍数 × (1 + (100-敌人防御百分比)×系数))
// 15. 雷击术 - 特殊型(基于目标状态) (伤害 = 物攻 × 倍数 × (1 + 特殊加成))
15 => [
'name' => '狂暴斩',
'name' => '雷击术',
'type' => 'damage_single',
'calc_type' => 'low_def_bonus',
'cost' => 32,
'level_req' => 20,
'desc' => '攻击防御低的敌人伤害更高',
'damage_ratio' => [1.1, 1.5, 2.0, 2.7],
'calc_type' => 'status_bonus',
'cost' => 24,
'level_req' => 10,
'desc' => '召唤雷电直击单个敌人,若敌人被异常状态影响伤害更高',
'damage_ratio' => [1.4, 1.9, 2.3, 3.2],
'status_bonus' => [0.3, 0.45, 0.6, 0.8], // 敌人异常状态加成系数
'base' => [6, 14, 28, 48], // 基础伤害值
'growth' => [0.7, 0.9, 1.1, 1.3], // 等级成长系数
],
],
@ -163,18 +190,21 @@ return [
'level_req' => 5,
'desc' => '召唤冰雹,攻击所有敌人',
'damage_ratio' => [0.7, 1.0, 1.3, 1.7],
'base' => [4, 10, 22, 42],
'growth' => [0.5, 0.7, 0.95, 1.15],
],
// 21. 炎爆术 - 魔攻型,随敌人数量加成
// 21. 狂风斩 - 物攻型 (每敌伤害 = 物攻 × 倍数)
21 => [
'name' => '炎爆术',
'name' => '狂风斩',
'type' => 'damage_aoe',
'calc_type' => 'matk_scaled',
'cost' => 40,
'level_req' => 12,
'desc' => '引发连锁爆炸,敌人越多伤害加成越高',
'damage_ratio' => [0.8, 1.1, 1.4, 1.9],
'enemy_count_bonus' => [0.1, 0.15, 0.2, 0.3], // 每增加一个敌人增加的伤害百分比
'calc_type' => 'patk',
'cost' => 45,
'level_req' => 16,
'desc' => '挥出狂暴的风刃,基于物攻伤害',
'damage_ratio' => [0.9, 1.2, 1.6, 2.1],
'base' => [6, 14, 28, 48],
'growth' => [0.7, 0.9, 1.1, 1.3],
],
// 22. 流星雨 - 混合型 (每敌伤害 = (魔攻 + 物攻) × 倍数)
@ -186,9 +216,11 @@ return [
'level_req' => 20,
'desc' => '召唤流星坠落,轰击全体敌人',
'damage_ratio' => [0.6, 0.85, 1.15, 1.55],
'base' => [5, 12, 25, 45],
'growth' => [0.6, 0.8, 1, 1.2],
],
// 23. 灭世风暴 - 基于暴击率 (每敌伤害 = 魔攻 × 倍数 × (1 + 暴击率×系数))
// 23. 灭世风暴 - 暴击加成型 (每敌伤害 = 魔攻 × 倍数 × (1 + 暴击率×系数))
23 => [
'name' => '灭世风暴',
'type' => 'damage_aoe',
@ -198,10 +230,26 @@ return [
'desc' => '引发天地异变,暴击率影响范围伤害',
'damage_ratio' => [0.9, 1.2, 1.6, 2.2],
'crit_bonus' => [0.4, 0.6, 0.9, 1.3],
'base' => [5, 12, 25, 45],
'growth' => [0.6, 0.8, 1, 1.2],
],
// 24. 末日火雨 - 敌人越多伤害越低,但每个敌人都会受伤
// 24. 炎爆术 - 敌人数量加成型 (每敌伤害 = 魔攻 × 倍数 × (1 + 敌人数-1 × 加成系数))
24 => [
'name' => '炎爆术',
'type' => 'damage_aoe',
'calc_type' => 'enemy_count_bonus',
'cost' => 40,
'level_req' => 12,
'desc' => '引发连锁爆炸,敌人越多伤害加成越高',
'damage_ratio' => [0.8, 1.1, 1.4, 1.9],
'enemy_count_bonus' => [0.1, 0.15, 0.2, 0.3], // 每增加一个敌人增加的伤害百分比
'base' => [4, 10, 22, 42], // 基础伤害值
'growth' => [0.5, 0.7, 0.95, 1.15], // 等级成长系数
],
// 25. 末日火雨 - 伤害分散型 (总伤害 = 魔攻 × 倍数,按敌人数分散,敌人越多每个敌人伤害越低)
25 => [
'name' => '末日火雨',
'type' => 'damage_aoe',
'calc_type' => 'dispersed_damage',
@ -210,17 +258,8 @@ return [
'desc' => '魔法能量分散到所有敌人,敌人越多分散越严重',
'damage_ratio' => [1.8, 2.5, 3.2, 4.0],
'dispersion' => [0.8, 0.75, 0.7, 0.65], // 随敌人数量衰减系数
],
// 25. 狂风斩 - 基于物攻 (每敌伤害 = 物攻 × 倍数)
25 => [
'name' => '狂风斩',
'type' => 'damage_aoe',
'calc_type' => 'patk',
'cost' => 45,
'level_req' => 16,
'desc' => '挥出狂暴的风刃,基于物攻伤害',
'damage_ratio' => [0.9, 1.2, 1.6, 2.1],
'base' => [5, 12, 25, 45], // 基础伤害值
'growth' => [0.6, 0.8, 1.0, 1.2], // 等级成长系数
],
],
@ -236,17 +275,22 @@ return [
'desc' => '为所有队员增加防护,恢复生命值',
'heal_ratio' => [0.3, 0.5, 0.75, 1.0],
'heal_base' => [15, 30, 50, 75],
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
// 31. 恢复光环 - 生命值百分比型 (每人恢复 = 自己最大生命值 × 百分比)
// 31. 强势守护 - 物攻型 (每人恢复 = 物攻 × 倍数 + 基础值)
31 => [
'name' => '恢复光环',
'name' => '强势守护',
'type' => 'heal_aoe',
'calc_type' => 'hp_percent',
'cost' => 35,
'level_req' => 14,
'desc' => '释放温暖的光芒,基于自己的最大生命值恢复队员',
'heal_ratio' => [0.2, 0.3, 0.4, 0.5],
'calc_type' => 'patk',
'cost' => 32,
'level_req' => 10,
'desc' => '以强大的力量保护队友,基于物攻进行治疗',
'heal_ratio' => [0.25, 0.4, 0.6, 0.85],
'heal_base' => [12, 25, 42, 65],
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
// 32. 圣灵之力 - 混合型 (每人恢复 = (魔攻 + 物攻) × 倍数)
@ -259,19 +303,21 @@ return [
'desc' => '强大的群体治疗,恢复所有队员',
'heal_ratio' => [0.25, 0.4, 0.6, 0.85],
'heal_base' => [10, 20, 35, 55],
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
// 33. 仙界救赎 - 智能治疗(优先治疗血量少的队员)
// 33. 恢复光环 - 生命值百分比型 (每人恢复 = 自己最大生命值 × 百分比)
33 => [
'name' => '仙界救赎',
'name' => '恢复光环',
'type' => 'heal_aoe',
'calc_type' => 'smart_heal',
'cost' => 55,
'level_req' => 32,
'desc' => '至高的救赎之力,优先治疗血量较低的队员',
'heal_ratio' => [0.4, 0.6, 0.9, 1.3],
'heal_base' => [25, 45, 70, 110],
'priority_bonus' => [0.2, 0.3, 0.4, 0.5], // 血量越少加成越多
'calc_type' => 'hp_percent',
'cost' => 35,
'level_req' => 14,
'desc' => '释放温暖的光芒,基于自己的最大生命值恢复队员',
'heal_ratio' => [0.2, 0.3, 0.4, 0.5],
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
// 34. 护盾术 - 基于防御属性 (每人恢复 = (物防+魔防) × 倍数)
@ -284,18 +330,23 @@ return [
'desc' => '根据防御力为队员恢复生命值',
'heal_ratio' => [0.5, 0.75, 1.1, 1.5],
'heal_base' => [8, 16, 28, 45],
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
// 35. 团队共鸣 - 基于队伍状态 (每人恢复 = 魔攻 × 倍数 × (队员数量系数))
// 35. 仙界救赎 - 智能治疗(优先治疗血量少的队员)
35 => [
'name' => '团队共鸣',
'name' => '仙界救赎',
'type' => 'heal_aoe',
'calc_type' => 'team_sync',
'cost' => 38,
'level_req' => 20,
'desc' => '队员越多,治疗效果越强',
'heal_ratio' => [0.35, 0.55, 0.8, 1.1],
'team_bonus' => [0.2, 0.3, 0.45, 0.6], // 每增加一个队员增加的治疗百分比
'calc_type' => 'smart_heal',
'cost' => 55,
'level_req' => 32,
'desc' => '至高的救赎之力,优先治疗血量较低的队员',
'heal_ratio' => [0.4, 0.6, 0.9, 1.3],
'heal_base' => [25, 45, 70, 110],
'priority_bonus' => [0.2, 0.3, 0.4, 0.5], // 血量越少加成越多
'base' => [8, 18, 38, 65],
'growth' => [0.8, 1, 1.2, 1.5],
],
],
@ -328,46 +379,5 @@ return [
8 => ['cost' => 10, 'bonus' => 70, 'cost_reduction' => 14],
9 => ['cost' => 12, 'bonus' => 80, 'cost_reduction' => 16],
10 => ['cost' => 15, 'bonus' => 100, 'cost_reduction' => 20],
],
// ============ 地牢法术掉落映射 ============
'dungeon_spell_drops' => [
1 => ['heal_single', 'damage_single', 'damage_aoe'], // 七玄门 (Lv.1-5)
2 => ['damage_single', 'damage_aoe', 'heal_aoe'], // 太南谷 (Lv.5-10)
3 => ['heal_single', 'heal_aoe'], // 血色禁地 (Lv.10-15)
4 => ['damage_single', 'damage_aoe'], // 黄枫谷 (Lv.15-20)
5 => ['damage_single', 'heal_aoe'], // 燕翎堡 (Lv.20-30)
6 => ['damage_single', 'heal_aoe'], // 越京皇宫 (Lv.30-40)
7 => ['damage_aoe'], // 乱星海-魁星岛 (Lv.40-50)
8 => ['damage_aoe', 'heal_single', 'heal_aoe'], // 虚天殿 (Lv.50-60)
9 => ['damage_single', 'damage_aoe', 'heal_single'], // 外星海 (Lv.60+)
],
// ============ 按法术类型和品质分类 ============
'spells_by_quality' => [
'common' => [
'heal_single' => [1],
'damage_single' => [10],
'damage_aoe' => [20],
'heal_aoe' => [30],
],
'rare' => [
'heal_single' => [2, 3],
'damage_single' => [11, 12],
'damage_aoe' => [21, 22],
'heal_aoe' => [31, 32],
],
'epic' => [
'heal_single' => [4, 5],
'damage_single' => [13, 14],
'damage_aoe' => [23, 24],
'heal_aoe' => [33, 34],
],
'legendary' => [
'heal_single' => [6],
'damage_single' => [15],
'damage_aoe' => [25],
'heal_aoe' => [35],
],
],
]
];

View File

@ -295,6 +295,28 @@ class Item
$teamBonus = $spellInfo['team_bonus'][$qualityIndex] ?? ($spellInfo['team_bonus'][0] ?? 0);
$priorityBonus = $spellInfo['priority_bonus'][$qualityIndex] ?? ($spellInfo['priority_bonus'][0] ?? 0);
// 计算基础伤害值(根据法术模板的基础值和成长系数)
$baseValue = 0;
$growth = 0;
if (isset($spellInfo['base']) && isset($spellInfo['growth'])) {
$baseArray = $spellInfo['base'];
$growthArray = $spellInfo['growth'];
// 确保索引在范围内
if (is_array($baseArray) && is_array($growthArray)) {
$baseValue = $baseArray[$qualityIndex] ?? ($baseArray[0] ?? 0);
$growth = $growthArray[$qualityIndex] ?? ($growthArray[0] ?? 0);
// 应用计算公式finalValue = baseValue + (level * growth) + randomBonus
$randomBonus = rand(0, max(1, (int)($baseValue * 0.15)));
$finalBaseValue = (int)($baseValue + ($level * $growth) + $randomBonus);
} else {
$finalBaseValue = 0;
}
} else {
$finalBaseValue = 0;
}
return [
'id' => uniqid('spell_'),
'type' => 'spell',
@ -318,6 +340,10 @@ class Item
'dispersion' => $dispersion,
'team_bonus' => $teamBonus,
'priority_bonus' => $priorityBonus,
// 基础伤害值(已计算)
'base' => $finalBaseValue,
'growth' => $growth,
];
}

View File

@ -144,7 +144,7 @@ class Battle
$this->round = 0;
// 显示遭遇界面
$this->showEncounter($out);
// $this->showEncounter($out);
$playerFirst = $this->determineFirstStrike();
@ -408,12 +408,12 @@ class Battle
$lowHpAllies = [];
foreach ($allies as $ally) {
if ($ally->hp < $ally->maxHp * 0.5) {
$status = $ally->getStats();
if ($status['hp'] < $status['maxHp'] * 0.5) {
$lowHpAllies[] = $ally;
}
}
$lowHpCount = count($lowHpAllies);
// 2. 筛选可用法术并分类
$availableSpells = [
'heal_aoe' => [],
@ -505,9 +505,8 @@ class Battle
if (!$target) return true;
// 显示法术基础信息
$calcType = $spellInfo['calc_type'] ?? 'matk';
$calcDesc = SpellDisplay::getCalcTypeDescription($calcType);
$actualCost = SpellCalculator::calculateCost($spellInfo);
$quality = $spellInfo['quality'] ?? 'common';
$qualityColor = SpellDisplay::getQualityColor($quality);
@ -515,16 +514,12 @@ class Battle
$damageResult = SpellCalculator::calculateDamage($spellInfo, $stats, $target->getStats(), $damageBonus);
$damage = $damageResult['damage'];
$isCrit = $damageResult['isCrit'];
$baseDamageMultiplier = $damageResult['multiplier'];
// 显示法术施放信息
$casterName = ($caster instanceof Player) ? "" : $caster->name;
$actionVerb = ($caster instanceof Player) ? "施放" : "施放了";
$out->writeln("{$this->cyan}{$this->reset} {$this->magenta}{$this->reset} {$casterName} {$actionVerb} {$qualityColor}{$name}{$this->reset}");
if ($caster instanceof Player) {
$out->writeln("{$this->cyan}{$this->reset} {$this->white}计算方式: {$calcDesc} | 消耗: {$actualCost} | 倍数: {$baseDamageMultiplier}x{$this->reset}");
}
if ($isCrit) {
$out->writeln("{$this->cyan}{$this->reset} {$this->magenta}{$this->red}{$this->bold}暴击!{$this->reset}{$target->name} 造成 {$this->red}{$damage}{$this->reset} 点魔法伤害!");
@ -562,9 +557,6 @@ class Battle
private function castDamageAoeSpell($out, Actor $caster, ?Actor $target, array $spellInfo, array $stats, int $damageBonus, string $name): bool
{
// 显示法术基础信息
$calcType = $spellInfo['calc_type'] ?? 'matk';
$calcDesc = SpellDisplay::getCalcTypeDescription($calcType);
$actualCost = SpellCalculator::calculateCost($spellInfo);
$quality = $spellInfo['quality'] ?? 'common';
$qualityColor = SpellDisplay::getQualityColor($quality);
@ -572,9 +564,7 @@ class Battle
$actionVerb = ($caster instanceof Player) ? "施放" : "施放了";
$out->writeln("{$this->cyan}{$this->reset} {$this->magenta}{$this->reset} {$casterName} {$actionVerb} {$qualityColor}{$name}{$this->reset}");
if ($caster instanceof Player) {
$out->writeln("{$this->cyan}{$this->reset} {$this->white}计算方式: {$calcDesc} | 消耗: {$actualCost}{$this->reset}");
}
$out->writeln("{$this->cyan}{$this->reset} {$this->magenta}✨ 魔法在整个战场爆炸!{$this->reset}");
$opponents = $this->getOpponents($caster);
@ -642,9 +632,6 @@ class Battle
}
// 显示法术基础信息
$calcType = $spellInfo['calc_type'] ?? 'matk';
$calcDesc = SpellDisplay::getCalcTypeDescription($calcType);
$actualCost = SpellCalculator::calculateCost($spellInfo);
$quality = $spellInfo['quality'] ?? 'common';
$qualityColor = SpellDisplay::getQualityColor($quality);
@ -652,9 +639,7 @@ class Battle
$actionVerb = ($caster instanceof Player) ? "施放" : "施放了";
$out->writeln("{$this->cyan}{$this->reset} {$this->green}{$this->reset} {$casterName} {$actionVerb} {$qualityColor}{$name}{$this->reset}");
if ($caster instanceof Player) {
$out->writeln("{$this->cyan}{$this->reset} {$this->white}计算方式: {$calcDesc} | 消耗: {$actualCost}{$this->reset}");
}
$healAmount = SpellCalculator::calculateHeal($spellInfo, $stats, $healBonus);
@ -677,9 +662,6 @@ class Battle
private function castHealAoeSpell($out, Actor $caster, ?Actor $target, array $spellInfo, array $stats, int $healBonus, string $name): bool
{
// 显示法术基础信息
$calcType = $spellInfo['calc_type'] ?? 'matk';
$calcDesc = SpellDisplay::getCalcTypeDescription($calcType);
$actualCost = SpellCalculator::calculateCost($spellInfo);
$quality = $spellInfo['quality'] ?? 'common';
$qualityColor = SpellDisplay::getQualityColor($quality);
@ -687,9 +669,7 @@ class Battle
$actionVerb = ($caster instanceof Player) ? "施放" : "施放了";
$out->writeln("{$this->cyan}{$this->reset} {$this->green}{$this->reset} {$casterName} {$actionVerb} {$qualityColor}{$name}{$this->reset}");
if ($caster instanceof Player) {
$out->writeln("{$this->cyan}{$this->reset} {$this->white}计算方式: {$calcDesc} | 消耗: {$actualCost}{$this->reset}");
}
$healAmount = SpellCalculator::calculateHeal($spellInfo, $stats, $healBonus);
@ -726,15 +706,11 @@ class Battle
// 显示法术基础信息
$quality = $spellInfo['quality'] ?? 'common';
$qualityColor = SpellDisplay::getQualityColor($quality);
$actualCost = SpellCalculator::calculateCost($spellInfo);
$casterName = ($caster instanceof Player) ? "" : $caster->name;
$actionVerb = ($caster instanceof Player) ? "施放" : "施放了";
$out->writeln("{$this->cyan}{$this->reset} {$this->cyan}{$this->reset} {$casterName} {$actionVerb} {$qualityColor}{$name}{$this->reset}");
if ($caster instanceof Player) {
$out->writeln("{$this->cyan}{$this->reset} {$this->white}消耗: {$actualCost}{$this->reset}");
}
$subtype = $spellInfo['subtype'] ?? '';

View File

@ -264,7 +264,9 @@ class InventoryPanel
$slot = $item['type'];
// 获取新装备原有的强化等级
$newItemEnhanceLevel = $item['enhanceLevel'] ?? 0;
// $newItemEnhanceLevel = $item['enhanceLevel'] ?? 0;
// 调整为不能继承强化等级
$newItemEnhanceLevel = 0;
// If there's already an item in the slot, swap enhance levels
if (isset($player->equip[$slot]) && !empty($player->equip[$slot])) {

View File

@ -277,6 +277,7 @@ class NpcPanel
'exp' => 0,
'baseStats' => $npc['base_stats'],
'equip' => [],
'talentWeights' => $npc['talent_weights'] ?? null, // 从 NPC 配置加载天赋权重
...$npc['base_stats']
]);

View File

@ -319,17 +319,50 @@ class StatsPanel
Screen::clear($this->game->output);
$this->game->output->writeln("{$this->cyan}========== 装备物品 =========={$this->reset}");
// 筛选可装备物品
// Step 1: 选择装备部位
$slots = ['weapon' => '武器', 'armor' => '护甲', 'boots' => '鞋子', 'ring' => '戒指', 'necklace' => '项链'];
$slotIdx = 1;
$slotMap = [];
$this->game->output->writeln("{$this->white}请先选择装备部位:{$this->reset}");
foreach ($slots as $slotKey => $slotName) {
$currentItem = $actor->equip[$slotKey] ?? null;
if ($currentItem) {
$this->game->output->writeln("[{$slotIdx}] {$slotName}: " . ItemDisplay::formatName($currentItem));
} else {
$this->game->output->writeln("[{$slotIdx}] {$slotName}: (空)");
}
$slotMap[$slotIdx] = $slotKey;
$slotIdx++;
}
$this->game->output->writeln("[0] 取消");
$slotChoice = Input::ask($this->game->output, "选择部位: ");
if ($slotChoice == 0) return;
if (!isset($slotMap[$slotChoice])) {
$this->game->output->writeln("无效选择");
Screen::sleep(1);
return;
}
$selectedSlot = $slotMap[$slotChoice];
// Step 2: 显示该部位的可装备物品
Screen::clear($this->game->output);
$this->game->output->writeln("{$this->cyan}========== 选择物品 =========={$this->reset}");
$equipableItems = [];
foreach ($this->game->player->inventory as $idx => $item) {
$type = $item['type'] ?? '';
if (in_array($type, ['weapon', 'armor', 'ring', 'boots', 'necklace'])) {
if (($item['type'] ?? '') === $selectedSlot) {
$equipableItems[$idx] = $item;
}
}
if (empty($equipableItems)) {
$this->game->output->writeln("{$this->white}没有可装备的物品{$this->reset}");
$this->game->output->writeln("{$this->white}背包中没有此类型的物品{$this->reset}");
Screen::pause($this->game->output);
return;
}
@ -345,28 +378,27 @@ class StatsPanel
$this->game->output->writeln("[0] 取消");
$choice = Input::ask($this->game->output, "选择装备: ");
$itemChoice = Input::ask($this->game->output, "选择装备: ");
if ($choice == 0) return;
if ($itemChoice == 0) return;
if (!isset($idxMap[$choice])) {
if (!isset($idxMap[$itemChoice])) {
$this->game->output->writeln("无效选择");
Screen::sleep(1);
return;
}
$realIdx = $idxMap[$choice];
$realIdx = $idxMap[$itemChoice];
$item = $this->game->player->inventory[$realIdx];
$slot = $item['type'];
// 如果该槽位已有装备,先卸下
if (!empty($actor->equip[$slot])) {
$oldItem = $actor->equip[$slot];
if (!empty($actor->equip[$selectedSlot])) {
$oldItem = $actor->equip[$selectedSlot];
$this->game->player->addItem($oldItem);
}
// 装备新物品
$actor->equip[$slot] = $item;
$actor->equip[$selectedSlot] = $item;
// 从背包移除
unset($this->game->player->inventory[$realIdx]);
@ -508,6 +540,7 @@ class StatsPanel
private function showEnhancePanel(string $slot, Actor $actor)
{
$out = $this->game->output;
$player = $this->game->player;
$item = $actor->equip[$slot] ?? null;
@ -519,17 +552,8 @@ class StatsPanel
Screen::clear($out);
$slotName = match ($slot) {
"weapon" => "武器",
"armor" => "护甲",
"boots" => "鞋子",
"ring" => "戒指",
"necklace" => "项链",
default => ucfirst($slot)
};
$enhanceLevel = $item['enhanceLevel'] ?? 0;
$maxLevel = 15;
$maxLevel = 14;
if ($enhanceLevel >= $maxLevel) {
$out->writeln("该装备已达到最高强化等级!");
@ -537,72 +561,58 @@ class StatsPanel
return;
}
$config = $this->enhanceConfig[$enhanceLevel] ?? $this->enhanceConfig[14];
$successRate = $config['rate'];
$cost = $config['cost'];
$downgradeChance = $config['downgrade'];
// 计算强化后的属性预览
$currentBonus = $this->calculateEnhanceBonus($enhanceLevel);
$nextBonus = $this->calculateEnhanceBonus($enhanceLevel + 1);
// 获取品质
$quality = $item['quality'] ?? $item['rarity'] ?? 'common';
$out->writeln("╔════════════════════════════════════╗");
$out->writeln("{$this->cyan}装备强化{$this->reset}");
$out->writeln("╠════════════════════════════════════╣");
// 使用统一的装备显示
$out->writeln("║ 位置: {$slotName}");
$out->writeln("║ 装备: " . ItemDisplay::formatName($item));
$out->writeln("║ 品质: " . ItemDisplay::getQualityColor($quality) .
ItemDisplay::getQualityName($quality) . $this->reset);
$out->writeln("");
// 显示主属性
$out->writeln("{$this->white}--- 主属性 ---{$this->reset}");
$statLines = ItemDisplay::formatStatsDetailed($item, "");
foreach ($statLines as $line) {
$out->writeln($line);
}
// 显示词条
$affixes = $item['affixes'] ?? [];
if (!empty($affixes)) {
$out->writeln("");
$out->writeln("{$this->white}--- 词条 ---{$this->reset}");
$affixLines = ItemDisplay::formatAffixes($item, "");
foreach ($affixLines as $line) {
$out->writeln($line);
}
}
$out->writeln("");
$out->writeln("╠════════════════════════════════════╣");
$out->writeln("");
$out->writeln("║ 当前强化等级: {$this->green}+{$enhanceLevel}{$this->reset}");
$out->writeln("║ 当前属性加成: {$this->green}+{$currentBonus}%{$this->reset}");
$out->writeln("");
$out->writeln("║ ➜ 强化至 {$this->yellow}+".($enhanceLevel + 1)."{$this->reset}");
$out->writeln("║ 属性加成: {$this->yellow}+{$nextBonus}%{$this->reset}");
$out->writeln("");
$out->writeln("║ 成功率: {$this->green}{$successRate}%{$this->reset}");
if ($downgradeChance > 0) {
$out->writeln("║ 失败掉级概率: {$this->red}{$downgradeChance}%{$this->reset}");
}
$out->writeln("║ 费用: {$this->yellow}{$cost}{$this->reset} 灵石");
$out->writeln("");
$out->writeln("║ 你的灵石: {$this->green}{$this->game->player->spiritStones}{$this->reset}");
$out->writeln("╚════════════════════════════════════╝");
// 显示目标等级选择
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 装 备 强 化 等 级 选 择{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("");
$out->writeln("装备: " . ItemDisplay::formatName($item));
$out->writeln("当前等级: {$this->yellow}+{$enhanceLevel}{$this->reset}");
$out->writeln("");
$out->writeln("可选等级:");
$out->writeln("");
$out->writeln("[1] 强化 | [0] 返回");
$choice = Screen::input($out, "选择操作:");
if ($choice == 1) {
$this->doEnhance($slot, $actor);
// 显示所有可选的目标等级
for ($target = $enhanceLevel + 1; $target <= $maxLevel; $target++) {
$totalCost = EquipmentEnhancer::getTotalCost($enhanceLevel, $target);
$canAfford = $player->spiritStones >= $totalCost ? "{$this->green}{$this->reset}" : "{$this->red}{$this->reset}";
$out->writeln(" [{$target}] +{$target} (需要: {$totalCost} 灵石) {$canAfford}");
}
$out->writeln("");
$out->writeln(" [0] 手动强化 (一次一级)");
$out->writeln("");
$out->writeln("当前灵石: {$this->yellow}{$player->spiritStones}{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$choice = Screen::input($out, "选择目标等级:");
if ($choice == 0) {
// 手动强化一次
$this->doEnhance($slot, $actor);
return;
}
$targetLevel = (int)$choice;
// 验证选择有效性
if ($targetLevel <= $enhanceLevel || $targetLevel > $maxLevel) {
$out->writeln("{$this->red}无效的目标等级{$this->reset}");
Screen::sleep(1);
return;
}
// 检查灵石是否足够
$totalCost = EquipmentEnhancer::getTotalCost($enhanceLevel, $targetLevel);
if ($player->spiritStones < $totalCost) {
$lack = $totalCost - $player->spiritStones;
$out->writeln("{$this->red}灵石不足!还需要 {$lack} 灵石{$this->reset}");
Screen::sleep(1);
return;
}
// 执行自动强化
$this->doEnhanceToLevel($slot, $actor, $targetLevel);
}
private function doEnhance(string $slot, Actor $actor)
@ -642,6 +652,101 @@ class StatsPanel
Screen::sleep(1);
}
/**
* 自动强化装备到目标等级
*/
private function doEnhanceToLevel(string $slot, Actor $actor, int $targetLevel)
{
$out = $this->game->output;
$player = $this->game->player;
$item = &$actor->equip[$slot];
if (!$item) return;
$currentLevel = $item['enhanceLevel'] ?? 0;
$item['enhanceLevel'] = $item['enhanceLevel'] ?? 0;
Screen::clear($out);
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 自 动 强 化 中{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("");
$out->writeln("装备: " . ItemDisplay::formatName($item));
$out->writeln("目标: +{$targetLevel}");
$out->writeln("");
$totalAttempts = 0;
$successCount = 0;
$failureCount = 0;
$downgrades = 0;
$startingSpirits = $player->spiritStones;
// 循环强化直到达到目标等级或灵石用完
while ($item['enhanceLevel'] < $targetLevel && $player->spiritStones > 0) {
// 检查下一级是否可以强化(灵石足够)
$config = EquipmentEnhancer::getConfig($item['enhanceLevel']);
if (!$config || $player->spiritStones < $config['cost']) {
break;
}
$totalAttempts++;
$oldLevel = $item['enhanceLevel'];
// 执行强化
$result = EquipmentEnhancer::enhance($item, $player);
if ($result['success']) {
$successCount++;
$out->writeln("{$totalAttempts} 次: {$this->green}✓ 成功{$this->reset} +{$oldLevel} → +{$result['newLevel']}");
} else {
$failureCount++;
if ($result['downgraded']) {
$downgrades++;
$out->writeln("{$totalAttempts} 次: {$this->red}✗ 失败并降级{$this->reset} +{$oldLevel} → +{$result['newLevel']}");
} else {
$out->writeln("{$totalAttempts} 次: {$this->yellow}✗ 失败{$this->reset} 等级保持 +{$oldLevel}");
}
}
}
// 显示最终结果
$out->writeln("");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 强 化 完 成{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$finalLevel = $item['enhanceLevel'];
$spiritUsed = $startingSpirits - $player->spiritStones;
$out->writeln("装备等级: {$this->yellow}+{$currentLevel}{$this->reset}{$this->yellow}+{$finalLevel}{$this->reset}");
$out->writeln("强化尝试: {$this->yellow}{$totalAttempts}{$this->reset}");
$out->writeln("成功次数: {$this->green}{$successCount}{$this->reset}");
$out->writeln("失败次数: {$this->red}{$failureCount}{$this->reset}");
if ($downgrades > 0) {
$out->writeln("降级次数: {$this->red}{$downgrades}{$this->reset}");
}
$out->writeln("灵石消耗: {$this->yellow}{$spiritUsed}{$this->reset}");
$out->writeln("剩余灵石: {$this->yellow}{$player->spiritStones}{$this->reset}");
if ($finalLevel >= $targetLevel) {
$out->writeln("");
$out->writeln("{$this->green}✓ 已达到目标等级!{$this->reset}");
} elseif ($player->spiritStones <= 0) {
$out->writeln("");
$out->writeln("{$this->yellow}灵石已用完{$this->reset}");
} else {
$lack = EquipmentEnhancer::getTotalCost($finalLevel, $targetLevel);
$out->writeln("");
$out->writeln("{$this->yellow}灵石不足,还需 {$lack} 灵石{$this->reset}");
}
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$this->game->saveState();
Screen::pause($out);
}
/**
* 计算强化等级对应的属性加成百分比
*/
@ -825,6 +930,7 @@ class StatsPanel
private function showSkillEnhancePanel(string $slot, Actor $actor)
{
$out = $this->game->output;
$player = $this->game->player;
$item = $actor->skillSlots[$slot] ?? null;
if (!$item) return;
@ -832,7 +938,7 @@ class StatsPanel
Screen::clear($out);
$enhanceLevel = $item['enhanceLevel'] ?? 0;
$maxLevel = 15;
$maxLevel = 14;
if ($enhanceLevel >= $maxLevel) {
$out->writeln("该技能已达到最高强化等级!");
@ -840,55 +946,65 @@ class StatsPanel
return;
}
// 使用与装备相同的强化配置
$config = $this->enhanceConfig[$enhanceLevel] ?? $this->enhanceConfig[14];
$successRate = $config['rate'];
$cost = $config['cost'];
$downgradeChance = $config['downgrade'];
$out->writeln("╔════════════════════════════════════╗");
$out->writeln("{$this->cyan}技能强化{$this->reset}");
$out->writeln("╠════════════════════════════════════╣");
$out->writeln("║ 技能: " . ItemDisplay::formatName($item));
$out->writeln("");
// 显示属性变化
$out->writeln("{$this->white}--- 属性预览 ---{$this->reset}");
$statLines = ItemDisplay::formatStatsDetailed($item, "");
foreach ($statLines as $line) {
$out->writeln($line);
}
$out->writeln("");
$out->writeln("╠════════════════════════════════════╣");
$out->writeln("");
$out->writeln("║ 当前等级: {$this->green}+{$enhanceLevel}{$this->reset}");
$out->writeln("");
$out->writeln("║ ➜ 强化至 {$this->yellow}+".($enhanceLevel + 1)."{$this->reset}");
$out->writeln("");
$out->writeln("║ 成功率: {$this->green}{$successRate}%{$this->reset}");
if ($downgradeChance > 0) {
$out->writeln("║ 失败掉级概率: {$this->red}{$downgradeChance}%{$this->reset}");
}
$out->writeln("║ 费用: {$this->yellow}{$cost}{$this->reset} 灵石");
$out->writeln("");
$out->writeln("║ 你的灵石: {$this->green}{$this->game->player->spiritStones}{$this->reset}");
$out->writeln("╚════════════════════════════════════╝");
// 显示目标等级选择
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 技 能 强 化 等 级 选 择{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("");
$out->writeln("技能: " . ItemDisplay::formatName($item));
$out->writeln("当前等级: {$this->yellow}+{$enhanceLevel}{$this->reset}");
$out->writeln("");
$out->writeln("可选等级:");
$out->writeln("");
$out->writeln("[1] 强化 | [0] 返回");
$choice = Screen::input($out, "选择操作:");
if ($choice == 1) {
$this->doEnhanceSkill($slot, $actor);
// 显示所有可选的目标等级
for ($target = $enhanceLevel + 1; $target <= $maxLevel; $target++) {
$totalCost = EquipmentEnhancer::getTotalCost($enhanceLevel, $target);
$canAfford = $player->spiritStones >= $totalCost ? "{$this->green}{$this->reset}" : "{$this->red}{$this->reset}";
$out->writeln(" [{$target}] +{$target} (需要: {$totalCost} 灵石) {$canAfford}");
}
$out->writeln("");
$out->writeln(" [0] 手动强化 (一次一级)");
$out->writeln("");
$out->writeln("当前灵石: {$this->yellow}{$player->spiritStones}{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$choice = Screen::input($out, "选择目标等级:");
if ($choice == 0) {
// 手动强化一次
$this->doEnhanceSkill($slot, $actor);
return;
}
$targetLevel = (int)$choice;
// 验证选择有效性
if ($targetLevel <= $enhanceLevel || $targetLevel > $maxLevel) {
$out->writeln("{$this->red}无效的目标等级{$this->reset}");
Screen::sleep(1);
return;
}
// 检查灵石是否足够
$totalCost = EquipmentEnhancer::getTotalCost($enhanceLevel, $targetLevel);
if ($player->spiritStones < $totalCost) {
$lack = $totalCost - $player->spiritStones;
$out->writeln("{$this->red}灵石不足!还需要 {$lack} 灵石{$this->reset}");
Screen::sleep(1);
return;
}
// 执行自动强化
$this->doEnhanceSkillToLevel($slot, $actor, $targetLevel);
}
private function doEnhanceSkill(string $slot, Actor $actor)
{
$out = $this->game->output;
$item = &$actor->skillSlots[$slot];
if (!$item) return;
// 使用 EquipmentEnhancer 模块执行强化 (它应该能处理任何带有 enhanceLevel 的物品)
@ -916,4 +1032,99 @@ class StatsPanel
$this->game->saveState();
Screen::sleep(1);
}
/**
* 自动强化技能到目标等级
*/
private function doEnhanceSkillToLevel(string $slot, Actor $actor, int $targetLevel)
{
$out = $this->game->output;
$player = $this->game->player;
$item = &$actor->skillSlots[$slot];
if (!$item) return;
$currentLevel = $item['enhanceLevel'] ?? 0;
$item['enhanceLevel'] = $item['enhanceLevel'] ?? 0;
Screen::clear($out);
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 自 动 强 化 中{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("");
$out->writeln("技能: " . ItemDisplay::formatName($item));
$out->writeln("目标: +{$targetLevel}");
$out->writeln("");
$totalAttempts = 0;
$successCount = 0;
$failureCount = 0;
$downgrades = 0;
$startingSpirits = $player->spiritStones;
// 循环强化直到达到目标等级或灵石用完
while ($item['enhanceLevel'] < $targetLevel && $player->spiritStones > 0) {
// 检查下一级是否可以强化(灵石足够)
$config = EquipmentEnhancer::getConfig($item['enhanceLevel']);
if (!$config || $player->spiritStones < $config['cost']) {
break;
}
$totalAttempts++;
$oldLevel = $item['enhanceLevel'];
// 执行强化
$result = EquipmentEnhancer::enhance($item, $player);
if ($result['success']) {
$successCount++;
$out->writeln("{$totalAttempts} 次: {$this->green}✓ 成功{$this->reset} +{$oldLevel} → +{$result['newLevel']}");
} else {
$failureCount++;
if ($result['downgraded']) {
$downgrades++;
$out->writeln("{$totalAttempts} 次: {$this->red}✗ 失败并降级{$this->reset} +{$oldLevel} → +{$result['newLevel']}");
} else {
$out->writeln("{$totalAttempts} 次: {$this->yellow}✗ 失败{$this->reset} 等级保持 +{$oldLevel}");
}
}
}
// 显示最终结果
$out->writeln("");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$out->writeln("{$this->cyan} 强 化 完 成{$this->reset}");
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$finalLevel = $item['enhanceLevel'];
$spiritUsed = $startingSpirits - $player->spiritStones;
$out->writeln("技能等级: {$this->yellow}+{$currentLevel}{$this->reset}{$this->yellow}+{$finalLevel}{$this->reset}");
$out->writeln("强化尝试: {$this->yellow}{$totalAttempts}{$this->reset}");
$out->writeln("成功次数: {$this->green}{$successCount}{$this->reset}");
$out->writeln("失败次数: {$this->red}{$failureCount}{$this->reset}");
if ($downgrades > 0) {
$out->writeln("降级次数: {$this->red}{$downgrades}{$this->reset}");
}
$out->writeln("灵石消耗: {$this->yellow}{$spiritUsed}{$this->reset}");
$out->writeln("剩余灵石: {$this->yellow}{$player->spiritStones}{$this->reset}");
if ($finalLevel >= $targetLevel) {
$out->writeln("");
$out->writeln("{$this->green}✓ 已达到目标等级!{$this->reset}");
} elseif ($player->spiritStones <= 0) {
$out->writeln("");
$out->writeln("{$this->yellow}灵石已用完{$this->reset}");
} else {
$lack = EquipmentEnhancer::getTotalCost($finalLevel, $targetLevel);
$out->writeln("");
$out->writeln("{$this->yellow}灵石不足,还需 {$lack} 灵石{$this->reset}");
}
$out->writeln("{$this->cyan}════════════════════════════════════{$this->reset}");
$this->game->saveState();
Screen::pause($out);
}
}