From 595295ebf2585575a761b9ceef2ef351eb404774 Mon Sep 17 00:00:00 2001 From: hant Date: Wed, 3 Dec 2025 23:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- save.json | 2 +- src/Modules/Battle.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/save.json b/save.json index 3fa5846..628a026 100644 --- a/save.json +++ b/save.json @@ -1 +1 @@ -{"player":{"hp":270,"maxHp":0,"patk":10,"matk":5,"pdef":5,"mdef":3,"crit":5,"critdmg":130,"level":11,"exp":1337,"maxExp":5743,"inventory":[{"name":"玄铁剑","type":"weapon","quality":"common","level":1,"patk":11,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.1 common品质的武器","id":"6930554849acb","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":35,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"6930578fb29f6","quantity":91},{"name":"培元丹","type":"consume","quality":"common","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":61,"affixes":[],"desc":"Lv.5 common品质的药剂","id":"693057959f5c2","quantity":1},{"name":"玄铁剑","type":"weapon","quality":"common","level":1,"patk":10,"matk":1,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.1 common品质的武器","id":"69305a28d318c","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":37,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305a3d522a2","quantity":1}],"equip":{"weapon":{"name":"烈焰刀","type":"weapon","quality":"legendary","level":1,"patk":35,"matk":50,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":27,"heal":0,"affixes":["暴击率 +7","物攻 +15","魔攻 +8%"],"desc":"Lv.1 legendary品质的武器","id":"693041a47105c","quantity":1,"enhanceLevel":0},"armor":{"name":"皮甲","type":"armor","quality":"legendary","level":3,"patk":0,"matk":0,"pdef":26,"mdef":8,"hp":92,"crit":0,"critdmg":0,"heal":0,"affixes":["物攻 +3%","魔攻 +8%","物防 +16"],"desc":"Lv.3 legendary品质的防具","id":"693044ffc1381","quantity":1,"enhanceLevel":0},"necklace":{"name":"金链","type":"necklace","quality":"rare","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":57,"crit":0,"critdmg":0,"heal":0,"affixes":["物防 +9"],"desc":"Lv.5 rare品质的项链","id":"693046bc441b6","quantity":1,"enhanceLevel":0}},"spiritStones":3286,"npcFlags":[],"talentPoints":15,"talents":{"hp":12,"patk":0,"matk":0,"pdef":0,"mdef":0,"crit":0,"critdmg":0},"mana":100,"maxMana":100,"spells":[],"spellBooks":{"3":1,"1":40,"10":36},"partners":[{"id":"li_feiyu","name":"厉飞雨","level":13,"exp":301,"maxExp":337,"equip":{"weapon":{"name":"玄铁剑","type":"weapon","quality":"rare","level":5,"patk":15,"matk":1,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":["暴击 +5"],"desc":"Lv.5 common品质的武器","id":"693055329e36e","quantity":1}},"talents":{"hp":36,"patk":3,"matk":0,"pdef":0,"mdef":0,"crit":0,"critdmg":0},"talentWeights":{"hp":1,"patk":1,"matk":1,"pdef":1,"mdef":1,"crit":1,"critdmg":1},"mana":100,"maxMana":100,"spells":[],"spellBooks":[],"hp":338,"maxHp":0,"patk":15,"matk":5,"pdef":5,"mdef":3,"crit":10,"critdmg":130}]},"dungeonId":1,"state":2} \ No newline at end of file +{"player":{"hp":266,"maxHp":0,"patk":10,"matk":5,"pdef":5,"mdef":3,"crit":5,"critdmg":130,"level":11,"exp":3637,"maxExp":5743,"inventory":[{"name":"玄铁剑","type":"weapon","quality":"common","level":1,"patk":11,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.1 common品质的武器","id":"6930554849acb","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":35,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"6930578fb29f6","quantity":84},{"name":"培元丹","type":"consume","quality":"common","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":61,"affixes":[],"desc":"Lv.5 common品质的药剂","id":"693057959f5c2","quantity":1},{"name":"玄铁剑","type":"weapon","quality":"common","level":1,"patk":10,"matk":1,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.1 common品质的武器","id":"69305a28d318c","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":37,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305a3d522a2","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":36,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305a5294bf6","quantity":2},{"name":"回灵丹","type":"consume","quality":"epic","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":109,"affixes":[],"desc":"Lv.5 epic品质的药剂","id":"69305a6d97942","quantity":1},{"name":"金疮药","type":"consume","quality":"epic","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":98,"affixes":[],"desc":"Lv.3 epic品质的药剂","id":"69305a7c8d884","quantity":1},{"name":"回灵丹","type":"consume","quality":"common","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":54,"affixes":[],"desc":"Lv.3 common品质的药剂","id":"69305a7c8d888","quantity":1},{"name":"金疮药","type":"consume","quality":"legendary","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":132,"affixes":[],"desc":"Lv.1 legendary品质的药剂","id":"69305a7c8d8e4","quantity":2},{"name":"金疮药","type":"consume","quality":"rare","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":55,"affixes":[],"desc":"Lv.1 rare品质的药剂","id":"69305a8f24bef","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":43,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305a8f24bf4","quantity":2},{"name":"金疮药","type":"consume","quality":"common","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":63,"affixes":[],"desc":"Lv.5 common品质的药剂","id":"69305a8f24bf7","quantity":1},{"name":"补气丹","type":"consume","quality":"common","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":60,"affixes":[],"desc":"Lv.5 common品质的药剂","id":"69305a9fac153","quantity":1},{"name":"皮甲","type":"armor","quality":"common","level":3,"patk":0,"matk":0,"pdef":6,"mdef":1,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.3 common品质的防具","id":"69305a9fac1df","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":42,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305aaea31ce","quantity":2},{"name":"培元丹","type":"consume","quality":"rare","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":71,"affixes":[],"desc":"Lv.3 rare品质的药剂","id":"69305aaea31d4","quantity":2},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":39,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305aaea31d7","quantity":1},{"name":"铜链","type":"necklace","quality":"rare","level":5,"patk":0,"matk":0,"pdef":8,"mdef":0,"hp":60,"crit":0,"critdmg":0,"heal":0,"affixes":["暴击率 +6"],"desc":"Lv.5 rare品质的项链","id":"69305ac73cf42","quantity":1},{"name":"补气丹","type":"consume","quality":"rare","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":76,"affixes":[],"desc":"Lv.5 rare品质的药剂","id":"69305ac73cf4d","quantity":1},{"name":"皮甲","type":"armor","quality":"rare","level":3,"patk":0,"matk":0,"pdef":9,"mdef":2,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":["物攻 +9"],"desc":"Lv.3 rare品质的防具","id":"69305ad2164f0","quantity":1},{"name":"雷霆锤","type":"weapon","quality":"rare","level":1,"patk":17,"matk":6,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":["物攻 +3%"],"desc":"Lv.1 rare品质的武器","id":"69305aebd9997","quantity":1},{"name":"铁剑","type":"weapon","quality":"rare","level":5,"patk":15,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":[],"desc":"Lv.5 common品质的武器","id":"69305aebd999d","quantity":1},{"name":"金疮药","type":"consume","quality":"rare","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":58,"affixes":[],"desc":"Lv.1 rare品质的药剂","id":"69305b01f12ef","quantity":1},{"name":"金疮药","type":"consume","quality":"epic","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":92,"affixes":[],"desc":"Lv.1 epic品质的药剂","id":"69305b10e9beb","quantity":1},{"name":"皮甲","type":"armor","quality":"rare","level":3,"patk":0,"matk":0,"pdef":10,"mdef":2,"hp":36,"crit":0,"critdmg":0,"heal":0,"affixes":["生命值 +34"],"desc":"Lv.3 rare品质的防具","id":"69305b10e9c10","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":52,"affixes":[],"desc":"Lv.3 common品质的药剂","id":"69305b1d30b2e","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":44,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305b4ed926f","quantity":2},{"name":"培元丹","type":"consume","quality":"common","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":50,"affixes":[],"desc":"Lv.3 common品质的药剂","id":"69305b69188e5","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":49,"affixes":[],"desc":"Lv.3 common品质的药剂","id":"69305b93d3049","quantity":1},{"name":"筑基丹","type":"consume","quality":"common","level":3,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":51,"affixes":[],"desc":"Lv.3 common品质的药剂","id":"69305b93d30c6","quantity":1},{"name":"青钢剑","type":"weapon","quality":"rare","level":1,"patk":13,"matk":4,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":["物攻 +7"],"desc":"Lv.1 rare品质的武器","id":"69305bb496214","quantity":1},{"name":"金疮药","type":"consume","quality":"common","level":1,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":40,"affixes":[],"desc":"Lv.1 common品质的药剂","id":"69305bb496228","quantity":1}],"equip":{"weapon":{"name":"烈焰刀","type":"weapon","quality":"legendary","level":1,"patk":35,"matk":50,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":27,"heal":0,"affixes":["暴击率 +7","物攻 +15","魔攻 +8%"],"desc":"Lv.1 legendary品质的武器","id":"693041a47105c","quantity":1,"enhanceLevel":0},"armor":{"name":"皮甲","type":"armor","quality":"legendary","level":3,"patk":0,"matk":0,"pdef":26,"mdef":8,"hp":92,"crit":0,"critdmg":0,"heal":0,"affixes":["物攻 +3%","魔攻 +8%","物防 +16"],"desc":"Lv.3 legendary品质的防具","id":"693044ffc1381","quantity":1,"enhanceLevel":0},"necklace":{"name":"金链","type":"necklace","quality":"rare","level":5,"patk":0,"matk":0,"pdef":0,"mdef":0,"hp":57,"crit":0,"critdmg":0,"heal":0,"affixes":["物防 +9"],"desc":"Lv.5 rare品质的项链","id":"693046bc441b6","quantity":1,"enhanceLevel":0}},"spiritStones":3779,"npcFlags":[],"talentPoints":15,"talents":{"hp":12,"patk":0,"matk":0,"pdef":0,"mdef":0,"crit":0,"critdmg":0},"mana":100,"maxMana":100,"spells":[],"spellBooks":{"3":1,"1":48,"10":50},"partners":[{"id":"li_feiyu","name":"厉飞雨","level":16,"exp":542,"maxExp":1135,"equip":{"weapon":{"name":"玄铁剑","type":"weapon","quality":"rare","level":5,"patk":15,"matk":1,"pdef":0,"mdef":0,"hp":0,"crit":0,"critdmg":0,"heal":0,"affixes":["暴击 +5"],"desc":"Lv.5 common品质的武器","id":"693055329e36e","quantity":1}},"talents":{"hp":42,"patk":6,"matk":0,"pdef":0,"mdef":0,"crit":0,"critdmg":0},"talentWeights":{"hp":1,"patk":1,"matk":1,"pdef":1,"mdef":1,"crit":1,"critdmg":1},"mana":100,"maxMana":100,"spells":[],"spellBooks":[],"hp":375,"maxHp":0,"patk":15,"matk":5,"pdef":5,"mdef":3,"crit":10,"critdmg":130}]},"dungeonId":1,"state":2} \ No newline at end of file diff --git a/src/Modules/Battle.php b/src/Modules/Battle.php index 32ba1d3..ee761f4 100644 --- a/src/Modules/Battle.php +++ b/src/Modules/Battle.php @@ -266,7 +266,7 @@ class Battle $playerHpText = $this->player->hp . "/" . $stats['maxHp']; $out->writeln("{$this->cyan}║{$this->reset} {$this->green}🧙{$this->reset} {$this->bold}玩家{$this->reset} Lv.{$this->player->level}"); $out->writeln("{$this->cyan}║{$this->reset} {$playerHpBar} {$this->white}{$playerHpText}{$this->reset}"); - $out->writeln("{$this->cyan}║{$this->reset} {$this->yellow}⚔️{$this->reset} {$stats['patk']}/{$stats['matk']} {$this->green}🛡️{$this->reset} {$stats['pdef']}/{$stats['mdef']} {$this->red}💥{$this->reset} {$stats['crit']}%"); + $out->writeln("{$this->cyan}║{$this->reset} {$this->yellow}⚔️{$this->reset} {$stats['patk']}/{$stats['matk']} {$this->green}🛡️{$this->reset} {$stats['pdef']}/{$stats['mdef']} {$this->red}💥{$this->reset} {$stats['crit']}/{$stats['critdmg']}%"); // 显示同伴信息 foreach ($this->player->partners as $partner) { @@ -280,6 +280,7 @@ class Battle $status = $partnerHp > 0 ? "" : " {$this->red}[倒下]{$this->reset}"; $out->writeln("{$this->cyan}║{$this->reset} {$this->magenta}👤{$this->reset} {$partner->name} Lv.{$partner->level}{$status}"); $out->writeln("{$this->cyan}║{$this->reset} {$partnerHpBar} {$this->white}{$partnerHpText}{$this->reset}"); + $out->writeln("{$this->cyan}║{$this->reset} {$this->yellow}⚔️{$this->reset} {$partnerStats['patk']}/{$partnerStats['matk']} {$this->green}🛡️{$this->reset} {$partnerStats['pdef']}/{$partnerStats['mdef']} {$this->red}💥{$this->reset} {$partnerStats['crit']}/{$partnerStats['critdmg']}%"); } $out->writeln("{$this->cyan}╠══════════════════════════════════════════╣{$this->reset}");