diff --git a/Readme.md b/Readme.md index 5a39c75..f973517 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ 异常生物见闻录 rpg 第二版 仓库 ## 使用者锁 -乐子人 + ## 使用流程 1. 在你进行你的内容更新之前,先执行一次拉取操作。正常情况下不会提示内容冲突,如果有,则VS code右上角点击文件,选择关闭文件夹。然后再把你本地那个同步文件夹删掉,重新从Github克隆。 @@ -22,7 +22,7 @@ ## 更新记录 -- **2023/12/30**;**乐子人**;技能优化,新增战斗统计;修改部分技能冷却机制; +- **2023/12/30**;**乐子人**;技能优化,新增战斗统计;修改部分技能冷却机制;新增技能点和技能学习系统; - **2023/12/24**;**乐子人**;配置主界面UI,开场效果优化; - **2023/12/11**;**乐子人**;一些数值削弱和BUG修复; - **2023/12/07**;**乐子人**;精准机制再次测试,优化精英怪事件避免被卡BUG; diff --git a/data/MapInfos.json b/data/MapInfos.json index 13cf5f7..ac2abb6 100644 --- a/data/MapInfos.json +++ b/data/MapInfos.json @@ -64,7 +64,7 @@ null, {"id":62,"expanded":false,"name":"伊娃之战","order":7,"parentId":15,"scrollX":1139,"scrollY":627}, {"id":63,"expanded":true,"name":"大海(过剧情)","order":62,"parentId":23,"scrollX":1139,"scrollY":627}, {"id":64,"expanded":true,"name":"塔纳古斯","order":12,"parentId":14,"scrollX":1769.3333333333333,"scrollY":1844.6666666666667}, -{"id":65,"expanded":true,"name":"阿拉曼达广场","order":13,"parentId":64,"scrollX":1081.3333333333333,"scrollY":1714}, +{"id":65,"expanded":true,"name":"阿拉曼达广场","order":13,"parentId":64,"scrollX":1081.3333333333333,"scrollY":1844.6666666666667}, {"id":66,"expanded":true,"name":"晋升之塔外","order":14,"parentId":65,"scrollX":1092,"scrollY":632.6666666666666}, {"id":67,"expanded":true,"name":"晋升之塔","order":15,"parentId":66,"scrollX":1081.3333333333333,"scrollY":855.3333333333334}, {"id":68,"expanded":false,"name":"阿拉曼达城墙顶部","order":16,"parentId":65,"scrollX":1092,"scrollY":632.6666666666666}, diff --git a/data/System.json b/data/System.json index 5cd59a0..8d59307 100644 --- a/data/System.json +++ b/data/System.json @@ -1 +1 @@ -{"airship":{"bgm":{"name":"Kan R Gao - Floating By","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"$巨龟岩台号","startMapId":0,"startX":0,"startY":0},"armorTypes":["","轻甲","重甲","魔法护甲","普通饰品","魔法饰品","魔法球","副手匕首","副手枪械","左手爪","莉莉的冰爪"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":12},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":10},{"type":1,"weaponImageId":7},{"type":2,"weaponImageId":21},{"type":1,"weaponImageId":14},{"type":1,"weaponImageId":10},{"type":0,"weaponImageId":2},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":2}],"battleBgm":{"name":"Battle1","pan":0,"pitch":100,"volume":90},"battleback1Name":"DecorativeTile","battleback2Name":"Temple","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"经费","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":65,"elements":["","物理","地","风","水","火","电","冰","圣","暗","精神","力场","混沌","幽能","毒","生命治疗","生命吸取","真实"],"equipTypes":["","武器","副手","头饰","甲衣","靴子","项链","手饰"],"gameTitle":"异常生物见闻录","gameoverMe":{"name":"Gameover1","pan":0,"pitch":100,"volume":90},"locale":"zh_CN","magicSkills":[2,4],"menuCommands":[true,true,true,true,true,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":true,"optSideView":false,"optSlipDeath":true,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Kan R Gao - Floating By","pan":0,"pitch":100,"volume":100},"characterIndex":1,"characterName":"Vehicle","startMapId":31,"startX":174,"startY":58},"skillTypes":["","特技","魔法","专属技能","神术/天赋","各种普通攻击"],"sounds":[{"name":"Cursor2","pan":0,"pitch":100,"volume":90},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":65,"startX":18,"startY":31,"switches":["","吃完饭","水管爆了","薇薇安出现","蝙蝠出现","海妖现身","五月海妖形态","出现水泡","水塔剧情借宿","去地下室","治疗海妖","准备出发","苏哈白火出现","击败幽灵船","不明海妖出现","丧尸出现","发现丧尸","击败人鱼","对战冰系怪物","对战老鼠怪","对战蝙蝠怪","","飞砖对话","豆豆星彩蛋完成","熔岩巨蝎出现","击败巨蝎","收集素材","对战魔族","第一次狗炮时的对话","狗炮彩蛋剧情结束","","怪物秒杀开关","阿拉曼达开局剧情完成","希尔妲对话完成","水泵站门前的对话","出发调查水泵站","小纸条对话","冰之鼠王被击杀","郝籽相关的对话","鸡神已死","神鹅被打败","击败巨蟹海妖","巴文特任务已领取","巴文特任务01开启","水兵安息","额外的收集任务","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","偷看","尝试交互","触碰脑和容器","完成研究红球","击败伊娃","出现水花","水花伤害","增加火球1","增加火球2","增加火球3","增加背球","增加左球","增加右球","进入纳萨托恩","进入管道","海妖消失","丧尸复苏","水晶破碎","打败守门海妖哨兵","被海妖围了","击败脑怪","密室","击败密室门卫","支援老王","击败海妖女王","发现大漩涡","前往水涌之核","关闭大护壁","豆豆出现","清理皇宫","清理完成","莎奇拉水泡开","点击w","能召唤飞船","初次进入研究炸","游戏开始","点击Q","","发现艾欧","","老王幸存者","进入大门","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["等级","Lv","HP","HP","MP","MP","TP","TP","经验值","EXP"],"commands":["战斗","逃跑","攻击","防御","物品","技能","装备","状态","整队","保存","游戏结束","设置","武器","护甲","随身杂物","装备","最强装备","清空","开始游戏","继续游戏",null,"回到标题","取消",null,"购买","出售"],"params":["最大 HP","最大 MP","攻击力","防御力","魔法攻击","魔法防御","敏捷","幸运","命中率","回避率"],"messages":{"actionFailure":"对%1没有效果!","actorDamage":"%1受到了 %2 点伤害!","actorDrain":"%1被吸收了 %3 点 %2!","actorGain":"%1的 %2 增加了 %3 点!","actorLoss":"%1的 %2 减少了 %3 点!","actorNoDamage":"%1没有受到伤害!","actorNoHit":"Miss! %1没有受到伤害!","actorRecovery":"%1恢复了 %3 点 %2!","alwaysDash":"始终跑步","bgmVolume":"BGM 音量","bgsVolume":"BGS 音量","buffAdd":"%1的%2上升了!","buffRemove":"%1的%2恢复正常了!","commandRemember":"记住指令","counterAttack":"%1的反击!","criticalToActor":"痛恨一击!","criticalToEnemy":"会心一击!","debuffAdd":"%1的%2下降了!","defeat":"%1被击败了。","emerge":"%1出现了!","enemyDamage":"%1受到了 %2 点伤害!","enemyDrain":"%1被吸收了 %3 点 %2!","enemyGain":"%1的 %2 增加了 %3 点!","enemyLoss":"%1的 %2 减少了 %3 点!","enemyNoDamage":"没有对%1造成伤害!","enemyNoHit":"Miss!没有对%1造成伤害!","enemyRecovery":"%1恢复了 %3 点 %2!","escapeFailure":"但是没有逃跑成功!","escapeStart":"%1开始逃跑了!","evasion":"%1躲开了攻击!","expNext":"距离下一%1","expTotal":"现在的%1","file":"文件","levelUp":"%1升到了 %2 %3!","loadMessage":"读取哪个文件?","magicEvasion":"%1躲避了魔法!","magicReflection":"%1反射了魔法!","meVolume":"ME 音量","obtainExp":"获得了 %1 点%2!","obtainGold":"获得了 %1\\G!","obtainItem":"获得了%1!","obtainSkill":"学会了%1!","partyName":"%1的队伍","possession":"持有数","preemptive":"%1先发制人!","saveMessage":"保存到哪个文件?","seVolume":"SE 音量","substitute":"%1保护了%2!","surprise":"%1被偷袭了!","useItem":"%1使用了%2!","victory":"%1胜利了!"}},"testBattlers":[{"actorId":2,"equips":[5,0,0,0,0],"level":13},{"actorId":0,"equips":[11,21,0,0,0],"level":1},{"actorId":0,"equips":[6,0,0,0,0],"level":13},{"actorId":0,"equips":[11,0,0,0,0],"level":1}],"testTroopId":17,"title1Name":"Plain","title2Name":"","titleBgm":{"name":"猫耳开关","pan":0,"pitch":100,"volume":90},"variables":["","技能数值","数据判断","掉落概率随机数","泛用随机数","通用怪物击杀数量","时间推进","计算","鸡的数量","海妖碰撞伤害","火位置X","火位置Y","玩家方向","火距离","BGM编号记录","清理废墟","鸡的死亡数","鹅的击杀数","地图精英猎杀数量","需要收集的炼金素材数量","","地图ID","玩家位置X","玩家位置Y","图片移动X","图片移动Y","随机数","火1位置X","火1位置Y","火1距离","火2位置X","火2位置Y","火2距离","火3位置X","火3位置Y","火3距离","背火位置X","背火位置Y","背火距离","右火位置X","右火位置Y","右火距离","左火位置X","左火位置Y","左火距离","海妖碰撞伤害1","海妖碰撞伤害2","海妖碰撞伤害3","海妖碰撞伤害背","海妖碰撞伤害右","海妖碰撞伤害左","玩家方向1","玩家方向2","玩家方向3","玩家方向4","玩家方向5","玩家方向6","伊娃血量","","","","史莱姆核心结晶数量","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","熔浆积淀刷新计时","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"versionId":13663136,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":90},"weaponTypes":["","剑","长柄武器","匕首","斧","爪","弓弩","枪炮","法杖","莉莉的火爪","魔王佩剑","魔导工作手套","宇宙碎片长剑"],"windowTone":[0,0,0,0]} \ No newline at end of file +{"airship":{"bgm":{"name":"Kan R Gao - Floating By","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"$巨龟岩台号","startMapId":0,"startX":0,"startY":0},"armorTypes":["","轻甲","重甲","魔法护甲","普通饰品","魔法饰品","魔法球","副手匕首","副手枪械","左手爪","莉莉的冰爪"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":12},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":10},{"type":1,"weaponImageId":7},{"type":2,"weaponImageId":21},{"type":1,"weaponImageId":14},{"type":1,"weaponImageId":10},{"type":0,"weaponImageId":2},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":2}],"battleBgm":{"name":"Battle1","pan":0,"pitch":100,"volume":90},"battleback1Name":"DecorativeTile","battleback2Name":"Temple","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"经费","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":65,"elements":["","物理","地","风","水","火","电","冰","圣","暗","精神","力场","混沌","幽能","毒","生命治疗","生命吸取","真实"],"equipTypes":["","武器","副手","头饰","甲衣","靴子","项链","手饰"],"gameTitle":"异常生物见闻录","gameoverMe":{"name":"Gameover1","pan":0,"pitch":100,"volume":90},"locale":"zh_CN","magicSkills":[2,4],"menuCommands":[true,true,true,true,true,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":true,"optSideView":false,"optSlipDeath":true,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Kan R Gao - Floating By","pan":0,"pitch":100,"volume":100},"characterIndex":1,"characterName":"Vehicle","startMapId":31,"startX":174,"startY":58},"skillTypes":["","特技","魔法","专属技能","神术/天赋","各种普通攻击"],"sounds":[{"name":"Cursor2","pan":0,"pitch":100,"volume":90},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":65,"startX":18,"startY":31,"switches":["","吃完饭","水管爆了","薇薇安出现","蝙蝠出现","海妖现身","五月海妖形态","出现水泡","水塔剧情借宿","去地下室","治疗海妖","准备出发","苏哈白火出现","击败幽灵船","不明海妖出现","丧尸出现","发现丧尸","击败人鱼","对战冰系怪物","对战老鼠怪","对战蝙蝠怪","","飞砖对话","豆豆星彩蛋完成","熔岩巨蝎出现","击败巨蝎","收集素材","对战魔族","第一次狗炮时的对话","狗炮彩蛋剧情结束","","怪物秒杀开关","阿拉曼达开局剧情完成","希尔妲对话完成","水泵站门前的对话","出发调查水泵站","小纸条对话","冰之鼠王被击杀","郝籽相关的对话","鸡神已死","神鹅被打败","击败巨蟹海妖","巴文特任务已领取","巴文特任务01开启","水兵安息","额外的收集任务","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","偷看","尝试交互","触碰脑和容器","完成研究红球","击败伊娃","出现水花","水花伤害","增加火球1","增加火球2","增加火球3","增加背球","增加左球","增加右球","进入纳萨托恩","进入管道","海妖消失","丧尸复苏","水晶破碎","打败守门海妖哨兵","被海妖围了","击败脑怪","密室","击败密室门卫","支援老王","击败海妖女王","发现大漩涡","前往水涌之核","关闭大护壁","豆豆出现","清理皇宫","清理完成","莎奇拉水泡开","点击w","能召唤飞船","初次进入研究炸","游戏开始","点击Q","","发现艾欧","","老王幸存者","进入大门","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["等级","Lv","HP","HP","MP","MP","TP","TP","经验值","EXP"],"commands":["战斗","逃跑","攻击","防御","物品","技能","装备","状态","整队","保存","游戏结束","设置","武器","护甲","随身杂物","装备","最强装备","清空","开始游戏","继续游戏",null,"回到标题","取消",null,"购买","出售"],"params":["最大 HP","最大 MP","攻击力","防御力","魔法攻击","魔法防御","敏捷","幸运","命中率","回避率"],"messages":{"actionFailure":"对%1没有效果!","actorDamage":"%1受到了 %2 点伤害!","actorDrain":"%1被吸收了 %3 点 %2!","actorGain":"%1的 %2 增加了 %3 点!","actorLoss":"%1的 %2 减少了 %3 点!","actorNoDamage":"%1没有受到伤害!","actorNoHit":"Miss! %1没有受到伤害!","actorRecovery":"%1恢复了 %3 点 %2!","alwaysDash":"始终跑步","bgmVolume":"BGM 音量","bgsVolume":"BGS 音量","buffAdd":"%1的%2上升了!","buffRemove":"%1的%2恢复正常了!","commandRemember":"记住指令","counterAttack":"%1的反击!","criticalToActor":"痛恨一击!","criticalToEnemy":"会心一击!","debuffAdd":"%1的%2下降了!","defeat":"%1被击败了。","emerge":"%1出现了!","enemyDamage":"%1受到了 %2 点伤害!","enemyDrain":"%1被吸收了 %3 点 %2!","enemyGain":"%1的 %2 增加了 %3 点!","enemyLoss":"%1的 %2 减少了 %3 点!","enemyNoDamage":"没有对%1造成伤害!","enemyNoHit":"Miss!没有对%1造成伤害!","enemyRecovery":"%1恢复了 %3 点 %2!","escapeFailure":"但是没有逃跑成功!","escapeStart":"%1开始逃跑了!","evasion":"%1躲开了攻击!","expNext":"距离下一%1","expTotal":"现在的%1","file":"文件","levelUp":"%1升到了 %2 %3!","loadMessage":"读取哪个文件?","magicEvasion":"%1躲避了魔法!","magicReflection":"%1反射了魔法!","meVolume":"ME 音量","obtainExp":"获得了 %1 点%2!","obtainGold":"获得了 %1\\G!","obtainItem":"获得了%1!","obtainSkill":"学会了%1!","partyName":"%1的队伍","possession":"持有数","preemptive":"%1先发制人!","saveMessage":"保存到哪个文件?","seVolume":"SE 音量","substitute":"%1保护了%2!","surprise":"%1被偷袭了!","useItem":"%1使用了%2!","victory":"%1胜利了!"}},"testBattlers":[{"actorId":2,"equips":[5,0,0,0,0],"level":13},{"actorId":0,"equips":[11,21,0,0,0],"level":1},{"actorId":0,"equips":[6,0,0,0,0],"level":13},{"actorId":0,"equips":[11,0,0,0,0],"level":1}],"testTroopId":17,"title1Name":"Plain","title2Name":"","titleBgm":{"name":"猫耳开关","pan":0,"pitch":100,"volume":90},"variables":["","技能数值","数据判断","掉落概率随机数","泛用随机数","通用怪物击杀数量","时间推进","计算","鸡的数量","海妖碰撞伤害","火位置X","火位置Y","玩家方向","火距离","BGM编号记录","清理废墟","鸡的死亡数","鹅的击杀数","地图精英猎杀数量","需要收集的炼金素材数量","","地图ID","玩家位置X","玩家位置Y","图片移动X","图片移动Y","随机数","火1位置X","火1位置Y","火1距离","火2位置X","火2位置Y","火2距离","火3位置X","火3位置Y","火3距离","背火位置X","背火位置Y","背火距离","右火位置X","右火位置Y","右火距离","左火位置X","左火位置Y","左火距离","海妖碰撞伤害1","海妖碰撞伤害2","海妖碰撞伤害3","海妖碰撞伤害背","海妖碰撞伤害右","海妖碰撞伤害左","玩家方向1","玩家方向2","玩家方向3","玩家方向4","玩家方向5","玩家方向6","伊娃血量","","","","史莱姆核心结晶数量","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","熔浆积淀刷新计时","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"versionId":95083468,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":90},"weaponTypes":["","剑","长柄武器","匕首","斧","爪","弓弩","枪炮","法杖","莉莉的火爪","魔王佩剑","魔导工作手套","宇宙碎片长剑"],"windowTone":[0,0,0,0]} \ No newline at end of file diff --git a/js/plugins.js b/js/plugins.js index 9174df1..1188f91 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -53,6 +53,8 @@ var $plugins = {"name":"YEP_X_ItemRequirements","status":true,"description":"v1.01 物品使用限制★","parameters":{}}, {"name":"YEP_X_ItemCategories","status":true,"description":"v1.01 (Requires YEP_ItemCore.js) Assign items to various\r\ncategories under the item menu.","parameters":{"---General---":"","Category Order":"Category:随身杂物, Category:消耗品, Category:合成材料, Category:任务道具, Category:配方书, Category:物理武器, Category:魔法武器, Category:防具, Category:饰品","---Naming---":"","Hidden Item A":"合成材料","Hidden Item B":"任务道具","Consumable":"Consumable","Nonconsumable":"Nonconsumable","Always Usable":"Usable","Battle Usable":"Battle","Field Usable":"Field","Never Usable":"Misc"}}, {"name":"YEP_Z_SkillRewards","status":true,"description":"v1.00 行动后奖励效果☁️","parameters":{"---General---":"","Effect Code":"\"// ----------\\n// Flat Gains\\n// ----------\\nif (data.match(/([\\\\+\\\\-]\\\\d+)[ ]HP/i)) {\\n value = parseInt(RegExp.$1);\\n user.gainHp(value);\\n animation = animation || hpAnimation;\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)[ ]MP/i)) {\\n value = parseInt(RegExp.$1);\\n user.gainMp(value);\\n animation = animation || mpAnimation;\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)[ ]TP/i)) {\\n value = parseInt(RegExp.$1);\\n user.gainTp(value);\\n animation = animation || tpAnimation;\\n\\n// ----------------\\n// Percentile Gains\\n// ----------------\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]HP/i)) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.mhp * rate);\\n user.gainHp(value);\\n animation = animation || hpAnimation;\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]MP/i)) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.mmp * rate);\\n user.gainMp(value);\\n animation = animation || mpAnimation;\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]TP/i)) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.maxTp() * rate);\\n user.gainTp(value);\\n animation = animation || tpAnimation;\\n\\n// ------------------\\n// Refund Skill Costs\\n// ------------------\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]REFUND HP COST/i)) {\\n if (isSkill) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.skillHpCost(skill) * rate);\\n user.gainHp(value);\\n animation = animation || hpAnimation;\\n } else {\\n skip = true;\\n }\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]REFUND MP COST/i)) {\\n if (isSkill) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.skillMpCost(skill) * rate);\\n user.gainMp(value);\\n animation = animation || mpAnimation;\\n } else {\\n skip = true;\\n }\\n\\n} else if (data.match(/([\\\\+\\\\-]\\\\d+)([%%])[ ]REFUND TP COST/i)) {\\n if (isSkill) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n value = Math.round(user.skillTpCost(skill) * rate);\\n user.gainTp(value);\\n animation = animation || tpAnimation;\\n } else {\\n skip = true;\\n }\\n\\n// -----------\\n// Refund Item\\n// -----------\\n} else if (data.match(/(\\\\d+)([%%])[ ]REFUND ITEM/i)) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n if (isItem && Math.random() < chance) {\\n $gameParty.gainItem(item, 1);\\n SoundManager.playUseItem();\\n animation = animation || itemAnimation;\\n } else {\\n skip = true;\\n }\\n\\n// ------------------------\\n// Add/Remove Buffs/Debuffs\\n// ------------------------\\n} else if (data.match(/ADD[ ](.*)[ ]BUFF,[ ](\\\\d+)[ ]TURN/i)) {\\n var str = String(RegExp.$1).toUpperCase();\\n var turns = parseInt(RegExp.$2);\\n var paramId = DataManager.getParamId(str);\\n if (paramId >= 0) {\\n user.addBuff(paramId, turns);\\n } else {\\n skip = true;\\n }\\n animation = animation || buffAnimation;\\n\\n} else if (data.match(/ADD[ ](.*)[ ]BUFF/i)) {\\n var str = String(RegExp.$1).toUpperCase();\\n var turns = 5;\\n var paramId = DataManager.getParamId(str);\\n if (paramId >= 0) {\\n user.addBuff(paramId, turns);\\n } else {\\n skip = true;\\n }\\n animation = animation || buffAnimation;\\n\\n} else if (data.match(/ADD[ ](.*)[ ]DEBUFF,[ ](\\\\d+)[ ]TURN/i)) {\\n var str = String(RegExp.$1).toUpperCase();\\n var turns = parseInt(RegExp.$2);\\n var paramId = DataManager.getParamId(str);\\n if (paramId >= 0) {\\n user.addDebuff(paramId, turns);\\n } else {\\n skip = true;\\n }\\n animation = animation || debuffAnimation;\\n\\n} else if (data.match(/ADD[ ](.*)[ ]DEBUFF/i)) {\\n var str = String(RegExp.$1).toUpperCase();\\n var turns = 5;\\n var paramId = DataManager.getParamId(str);\\n if (paramId >= 0) {\\n user.addDebuff(paramId, turns);\\n } else {\\n skip = true;\\n }\\n animation = animation || debuffAnimation;\\n\\n} else if (data.match(/REMOVE[ ](.*)[ ](?:BUFF|DEBUFF)/i)) {\\n var str = String(RegExp.$1).toUpperCase();\\n var paramId = DataManager.getParamId(str);\\n if (paramId >= 0) {\\n user.removeBuff(paramId);\\n } else {\\n skip = true;\\n }\\n animation = animation || miscAnimation;\\n\\n// -----------------\\n// Add/Remove States\\n// -----------------\\n} else if (data.match(/ADD STATE[ ](\\\\d+)/i)) {\\n var stateId = parseInt(RegExp.$1);\\n user.addState(stateId);\\n animation = animation || addStateAnimation;\\n\\n} else if (data.match(/REMOVE STATE[ ](\\\\d+)/i)) {\\n var stateId = parseInt(RegExp.$1);\\n if (user.isStateAffected(stateId)) {\\n user.removeState(stateId);\\n animation = animation || removeStateAnimation;\\n } else {\\n skip = true;\\n }\\n\\n// ----------------\\n// Rolling Critical\\n// ----------------\\n} else if (data.match(/ROLLING CRITICAL[ ]([\\\\+\\\\-]\\\\d+)([%%])/i)) {\\n if (isSkill) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n user._rollingCritical = user._rollingCritical || {};\\n user._rollingCritical[skill.id] = user._rollingCritical[skill.id] || 0;\\n user._rollingCritical[skill.id] += rate;\\n } else {\\n skip = true;\\n }\\n\\n} else if (data.match(/ROLLING CRITICAL[ ](\\\\d+)([%%])/i)) {\\n if (isSkill) {\\n rate = parseFloat(RegExp.$1) * 0.01;\\n user._rollingCritical = user._rollingCritical || {};\\n user._rollingCritical[skill.id] = user._rollingCritical[skill.id] || 0;\\n user._rollingCritical[skill.id] = rate;\\n } else {\\n skip = true;\\n }\\n\\n// -------------------------------\\n// Add new effects above this line\\n// -------------------------------\\n} else {\\n skip = true;\\n}\"","Weakness Rate":"1.20","Resisted Rate":"0.80","---Animations---":"","HP Animation":"49","MP Animation":"49","TP Animation":"0","Item Animation":"0","Buff Animation":"0","Debuff Animation":"0","Add State Animation":"0","Remove State Animation":"0","Misc Animation":"0"}}, +{"name":"YEP_JobPoints","status":true,"description":"v1.09 这个插件本身并没有多大作用,但它可以让参与者获得用于其他插件的JP(工作点数)。","parameters":{"---General---":"","JP Text":"JP","JP Icon":"188","Max JP":"0","JP Per Action":"0","JP Per Level":"a.level > 70 ? 0 : (a.level > 30 ? 2 : 1)","JP Per Enemy":"0","Show Results":"true","JP Gained in Battle":"%1 gains %2%3!","Alive Actors":"true","---Menu---":"","Show In Menu":"true","Menu Format":"%1\\c[4]%2\\c[0]%3","---Victory Aftermath---":"","Enable Aftermath":"false","Aftermath Text":"JP Earned","Aftermath Format":"+%1\\c[4]%2\\c[0]%3","Aftermath JP Earned":"JP Earned in Battle"}}, +{"name":"YEP_SkillLearnSystem","status":true,"description":"v1.13 技能学习系统☁️","parameters":{"---魔改---":"","ShowGoldWindowFormat":"%1\\c[1]JP\\i[188] \\c[0]%2\\c[1]金\\i[313]","---命令---":"","Learn Command":"学习技能","Show Command":"true","Enable Command":"true","Integrate":"false","---确认学习---":"","Confirm Window":"true","Confirm Text":"%1 学习 %2吗?","Confirm Yes":"学习","Confirm No":"不学习","---技能学习---":"","Learned Text":"学习","Learned Size":"20","Learn Cost":"学习技能费用","Cost Size":"20","Show Gold Window":"true","---默认---":"","Default Gold Cost":"1000","Default JP Cost":"100"}}, {"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, {"name":"YEP_ShopMenuCore","status":true,"description":"v1.05 商店菜单核心☁️","parameters":{"---General---":"","Command Order":"Buy Sell Equip Custom Cancel","Shop List Width":"Graphics.boxWidth / 2 + Graphics.boxWidth / 10","Command Alignment":"center","Status Window":"","Default Mode":"nothing","Stat Switching":"false","Cannot Equip":"Can't Equip","Stat Font Size":"20","Cannot Equip Font Size":"20","---Info Window---":"","Show Icon":"true","Icon Size":"128","Font Size":"20","Recovery Format":"%1 Heal","Add State":"+State","Add Buff":"+Buff","Remove State":"-State","Remove Buff":"-Buff","Maximum Icons":"4"}}, {"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, diff --git a/js/plugins/YEP_JobPoints.js b/js/plugins/YEP_JobPoints.js new file mode 100644 index 0000000..e6c3825 --- /dev/null +++ b/js/plugins/YEP_JobPoints.js @@ -0,0 +1,874 @@ +//============================================================================= +// Yanfly Engine Plugins - Job Points +// YEP_JobPoints.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_JobPoints = true; + +var Yanfly = Yanfly || {}; +Yanfly.JP = Yanfly.JP || {}; +Yanfly.JP.version = 1.09; + +//============================================================================= + /*: + * @plugindesc v1.09 这个插件本身并没有多大作用,但它可以让参与者获得用于其他插件的JP(工作点数)。 + * @author Yanfly Engine Plugins + * + * @param ---General--- + * @default + * + * @param JP Text + * @parent ---General--- + * @desc 这会改变你希望JP出现在游戏中的方式。 + * @default JP + * + * @param JP Icon + * @parent ---General--- + * @type number + * @min 0 + * @desc 这是用于JP的图标。如果不想使用图标,请使用0。 + * @default 188 + * + * @param Max JP + * @parent ---General--- + * @type number + * @min 0 + * @desc 这是职业能拥有的最大JP。如果希望没有限制,请使用0。 + * @default 0 + * + * @param JP Per Action + * @parent ---General--- + * @desc 战斗中增加的JP值 + * @default 10 + Math.randomInt(10) + * + * @param JP Per Level + * @parent ---General--- + * @desc 这是演员每升一级获得的JP值。 + * @default 100 + Math.randomInt(100) + * + * @param JP Per Enemy + * @parent ---General--- + * @desc 这是每个被击败的敌人获得的JP值。 + * @default 50 + Math.randomInt(10) + * + * @param Show Results + * @parent ---General--- + * @type boolean + * @on Show + * @off Hide + * @desc 获胜后,是否显示JP金额 + * NO - false YES - true + * @default true + * + * @param JP Gained in Battle + * @parent ---General--- + * @desc 整战斗后获得的JP文本的显示方式。 + * %1 - Actor %2 Value %3 JP + * @default %1 gains %2%3! + * + * @param Alive Actors + * @parent ---General--- + * @type boolean + * @on Alive Requirement + * @off No Requirement + * @desc 主角们必须活着才能从敌人那里获得JP。 + * NO - false YES - true + * @default true + * + * @param ---Menu--- + * @default + * + * @param Show In Menu + * @parent ---Menu--- + * @type boolean + * @on Show + * @off Hide + * @desc 在主菜单中显示JP? + * NO - false YES - true + * @default true + * + * @param Menu Format + * @parent ---Menu--- + * @desc 菜单中JP文本格式的显示方式。 + * %1 - Value %2 - Amount %3 - Icon + * @default %1\c[4]%2\c[0]%3 + * + * @param ---Victory Aftermath--- + * @default + * + * @param Enable Aftermath + * @parent ---Victory Aftermath--- + * @type boolean + * @on Enable + * @off Disable + * @desc 是否开启胜利JP窗口 + * NO - false YES - true + * @default true + * + * @param Aftermath Text + * @parent ---Victory Aftermath--- + * @desc 用于描述JP收入的文本。 + * @default JP Earned + * + * @param Aftermath Format + * @parent ---Victory Aftermath--- + * @desc 如何去描述收入文本的内容 + * %1 - Value %2 - Amount %3 - Icon + * @default +%1\c[4]%2\c[0]%3 + * + * @param Aftermath JP Earned + * @parent ---Victory Aftermath--- + * @desc 描述每个演员能挣多少JP。 + * @default JP Earned in Battle + * + * @help + * + * + * 魔改作者: 流逝的岁月 + * 魔改版本: v1.00 + * + * 魔改内容: v1.00 将JP的概念提升到每个角色级,而并不是原本的职业级,因此涉及到角色职业级的功能将自动向上安排,谨记! + * + * + * + * 可以使用脚本 Zzy.CYJP.GetJP(actorId) 返回值为指定角色的JP值,actorId是角色的ID值 + * 可以使用脚本 Zzy.CYJP.SetJP(actorId,value) 设置一个角色的JP点,为指定值,actorId是角色ID值,value是一个固定的数值 + * 可以使用脚本 Zzy.CYJP.GainJP(actorId,value) 增加一个角色的JP点,为指定值,actorId是角色ID值,value是一个固定的数值 + * 可以使用脚本 Zzy.CYJP.LoseJP(actorId,value) 减少一个角色的JP点,为指定值,actorId是角色ID值,value是一个固定的数值 + * + * + * + * + * + * + * ============================================================================ + * 介绍 + * ============================================================================ + * + * 这个插件本身不会改变任何主要的游戏功能,但是如果你决定在游戏中加入工作点数,它会与其他插件一起使用这个插件的功能。 + * + * 当获得工作分数时,会将其分配给演员当前的班级。如果参与者要切换类,那么作业点将更改为该类的作业点,直到恢复。 + * + * ============================================================================ + * 胜利后的兼容性 + * ============================================================================ + * + * 如果你安装了YEP_VictoryAffairs插件,并希望使用JP windows,请在插件管理器中将该插件放置在YEP_VictoryAffairs之下。 + * + * 之后,如果您希望定义JP窗口在某个时间点出现的时间,而不是插件自动执行该操作,请在希望JP窗口出现的Victory Founder内的“Victory Order”参数中插入“JP”。 + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * 以下是一些与工作点相关的标签。 + * + * Actor Notetags + * + * 对于参与者的初始类,将参与者的起始JP值设置为x。 + * + * + * 将类x的演员起始JP值设置为y。 + * + * +*这改变了JP上涨x%的速度。默认情况下,所有对象的默认比率均为100%。将这一比例提高到200%将使获得的JP增加两倍,而50%将使获得的JP减半。 + * + * Skill and Item Notetags + * + * 这使得使用此技能或物品的演员将获得x数量的JP,而不是参数中的默认JP。 + * + * + * 这使得受此技能或物品影响的目标演员获得x点JP。 + * + * Class, Weapon, Armor, and State Notetag + * +*这改变了日元上涨x%的速度。默认情况下,所有对象的默认比率均为100%。将这一比例提高到200%将使获得的日元增加两倍,而50%将使获得的日元减半。 + * + * Enemy Notetag + * + * 当敌人被击败时,在场的党员每人将获得x日元。 + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * 对于那些想知道如何手动为演员提供、删除或设置JP的人,可以使用lowing Plugin Commands. + * + * Plugin Commands: + * + * gainJp actorId jp + * gainJp actorId jp classId + * 将“actorId”替换为您希望更改其JP的演员的ID。将“jp”替换为您希望更改的jp金额。如果您使用的是“classId”,请将其替换为您希望更改的参与者类的ID。此命令将使演员获得JP。 + * + * loseJp actorId jp + * loseJp actorId jp classId +*将“actorId”替换为您希望更改其JP的演员的ID。将“jp”替换为您希望更改的jp金额。如果您使用的是“classId”,请将其替换为您希望更改的参与者类的ID。此命令将导致演员失去JP。 + * + * setJp actorId jp + * setJp actorId jp classId +*将“actorId”替换为您希望更改其JP的演员的ID。将“jp”替换为您希望更改的jp金额。如果您使用的是“classId”,请将其替换为您希望更改的参与者类的ID。此命令将演员的JP设置为特定值。 + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.09: + * - Updated for RPG Maker MV version 1.5.0. + * + * Version 1.08: + * - Lunatic Mode fail safes added. + * + * Version 1.07: + * - Updated for RPG Maker MV version 1.1.0. + * + * Version 1.06: + * - Added 'Alive Actors' plugin parameter to prevent dead actors from gaining + * JP from enemies. Any JP that currently dead actors earned in battle from + * actions will still be 'earned' at the end of battle. + * + * Version 1.05: + * - Updated compatibility for Subclasses gaining JP. + * + * Version 1.04a: + * - Added failsafes to prevent JP from turning into NaN midbattle. + * - Added failsafes to prevent no-target scopes from crashing the game. + * + * Version 1.03: + * - Added 'Show Results' parameter to show/hide JP earned after battle for + * those who aren't using the Victory Aftermath plugin. + * + * Version 1.02: + * - Fixed a bug that would gain JP for changing classes of a higher level. + * + * Version 1.01: + * - Added failsafes to prevent JP from turning into NaN. + * + * Version 1.00: + * - Finished Plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_JobPoints'); +Yanfly.Param = Yanfly.Param || {}; +Yanfly.Icon = Yanfly.Icon || {}; + +Yanfly.Param.Jp = String(Yanfly.Parameters['JP Text']); +Yanfly.Icon.Jp = Number(Yanfly.Parameters['JP Icon']); +Yanfly.Param.JpMax = Number(Yanfly.Parameters['Max JP']); +Yanfly.Param.JpPerAction = String(Yanfly.Parameters['JP Per Action']); +Yanfly.Param.JpPerEnemy = String(Yanfly.Parameters['JP Per Enemy']); +Yanfly.Param.JpShowResults = eval(String(Yanfly.Parameters['Show Results'])); +Yanfly.Param.JpTextFormat = String(Yanfly.Parameters['JP Gained in Battle']); +Yanfly.Param.JpAliveActors = eval(String(Yanfly.Parameters['Alive Actors'])); + +Yanfly.Param.JpShowMenu = String(Yanfly.Parameters['Show In Menu']); +Yanfly.Param.JpShowMenu = eval(Yanfly.Param.JpShowMenu); +Yanfly.Param.JpMenuFormat = String(Yanfly.Parameters['Menu Format']); + +Yanfly.Param.JpPerLevel = String(Yanfly.Parameters['JP Per Level']); +Yanfly.Param.JpEnableAftermath = String(Yanfly.Parameters['Enable Aftermath']); +Yanfly.Param.JpAftermathText = String(Yanfly.Parameters['Aftermath Text']); +Yanfly.Param.JpAftermathFmt = String(Yanfly.Parameters['Aftermath Format']); +Yanfly.Param.JpAftermathEarn = String(Yanfly.Parameters['Aftermath JP Earned']); + +//============================================================================= +// DataManager +//============================================================================= + + +var Zzy = Zzy || {}; +Zzy.CYJP = Zzy.CYJP || {}; + + + +Yanfly.JP.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.JP.DataManager_isDatabaseLoaded.call(this)) return false; + if (!Yanfly._loaded_YEP_JobPoints) { + this.processJPNotetags1($dataActors); + this.processJPNotetags2($dataSkills); + this.processJPNotetags2($dataItems); + this.processJPNotetags3($dataEnemies); + this.processJPNotetags4($dataClasses); + this.processJPNotetags4($dataWeapons); + this.processJPNotetags4($dataArmors); + this.processJPNotetags4($dataStates); + Yanfly._loaded_YEP_JobPoints = true; + } + return true; +}; + +DataManager.processJPNotetags1 = function(group) { + var note1 = /<(?:STARTING JP):[ ](\d+)>/i; + var note2 = /<(?:CLASS)[ ](\d+)[ ](?:STARTING JP):[ ](\d+)>/i; + var note3 = /<(?:JP RATE):[ ](\d+)([%%])>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.startingJp = {}; + obj.jpRate = 1.0; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.startingJp[obj.classId] = parseInt(RegExp.$1); + } else if (line.match(note2)) { + obj.startingJp[parseInt(RegExp.$1)] = parseInt(RegExp.$2); + } else if (line.match(note3)) { + obj.jpRate = parseFloat(RegExp.$1 * 0.01); + } + } + } +}; + +DataManager.processJPNotetags2 = function(group) { + var note1 = /<(?:GAIN JP|JP GAIN):[ ](\d+)>/i; + var note2 = /<(?:TARGET GAIN JP|TARGET JP GAIN):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.gainJp = Yanfly.Param.JpPerAction; + obj.targetGainJp = 0; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.gainJp = parseInt(RegExp.$1); + } else if (line.match(note2)) { + obj.targetGainJp = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.processJPNotetags3 = function(group) { + var note1 = /<(?:JP):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.jp = Yanfly.Param.JpPerEnemy; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.jp = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.processJPNotetags4 = function(group) { + var note1 = /<(?:JP RATE):[ ](\d+)([%%])>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.jpRate = 1.0; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.jpRate = parseFloat(RegExp.$1 * 0.01); + } + } + } +}; + +//============================================================================= +// BattleManager +//============================================================================= + +Yanfly.JP.BattleManager_makeRewards = BattleManager.makeRewards; +BattleManager.makeRewards = function() { + Yanfly.JP.BattleManager_makeRewards.call(this); + this._rewards.jp = $gameTroop.jpTotal(); + this.gainJp(); +}; + +BattleManager.gainJp = function() { + var jp = $gameTroop.jpTotal(); + $gameMessage.newPage(); + if (Yanfly.Param.JpAliveActors) { + var members = $gameParty.aliveMembers(); + } else { + var members = $gameParty.members(); + } + members.forEach(function(actor) { + actor.gainJp(jp); + }); +}; + +Yanfly.JP.BattleManager_displayRewards = BattleManager.displayRewards; +BattleManager.displayRewards = function() { + Yanfly.JP.BattleManager_displayRewards.call(this); + this.displayJpGain(); +}; + +BattleManager.displayJpGain = function() { + if (!Yanfly.Param.JpShowResults) return; + var jp = $gameTroop.jpTotal(); + $gameMessage.newPage(); + $gameParty.members().forEach(function(actor) { + var fmt = Yanfly.Param.JpTextFormat; + var text = fmt.format(actor.name(), Yanfly.Util.toGroup(actor.battleJp()), + Yanfly.Param.Jp); + $gameMessage.add('\\.' + text); + }); +}; + +//============================================================================= +// Game_Battler +//============================================================================= + +Yanfly.JP.Game_Battler_useItem = Game_Battler.prototype.useItem; +Game_Battler.prototype.useItem = function(item) { + Yanfly.JP.Game_Battler_useItem.call(this, item); + if (!$gameParty.inBattle()) return; + if (this.isActor()) this.gainJp(eval(item.gainJp), this.currentClass().id); +}; + +Yanfly.JP.Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart; +Game_Battler.prototype.onBattleStart = function() { + Yanfly.JP.Game_Battler_onBattleStart.call(this); + this._battleJp = 0; +}; + +Yanfly.JP.Game_Battler_onBattleEnd = Game_Battler.prototype.onBattleEnd; +Game_Battler.prototype.onBattleEnd = function() { + Yanfly.JP.Game_Battler_onBattleEnd.call(this); + this._battleJp = 0; +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +//此处将会对GP进行调整,不再使用原版的JP功能,而是调用一个统一的JP功能 + + +Yanfly.JP.Game_Actor_setup = Game_Actor.prototype.setup; +Game_Actor.prototype.setup = function(actorId) +{ + Yanfly.JP.Game_Actor_setup.call(this, actorId); + this.initJp(); +}; + +Game_Actor.prototype.jp = function(classId) +{ + //---魔改--- v1.00 输出修改后的jp + if(this._ZzyCYTPJP === undefined) + {this.initJp();} + + return this._ZzyCYTPJP; + + + if (!this._jp) this.initJp(); + if (!this._jp) return 0; + if (classId === undefined) classId = this.currentClass().id; + if (!this._jp[classId]) this._jp[classId] = 0; + return this._jp[classId]; +}; + +Game_Actor.prototype.initJp = function() //初始化JP效果 +{ + var actor = this.actor(); + for (var i = 0; i < $dataClasses.length; i++) { + if (actor.startingJp) { + var jp = actor.startingJp[i] || 0; + this.setJp(jp, i); + } + } + + //---魔改--- v1.00 设置JP点数为当前职业的JP点 + var cid = this.currentClass().id; + var initJP = this._jp[cid] ? this._jp[cid] : 0; + this._ZzyCYTPJP = initJP;//获取初始化JP的效果 +}; + +Game_Actor.prototype.setJp = function(value, classId) //设置JP值 +{ + value = parseInt(value); + if (value === NaN) value = 0; + classId = classId || this.currentClass().id; + if (!this._jp) this._jp = {}; + if (!this._jp[classId]) this._jp[classId] = 0; + this._jp[classId] = Math.max(0, value); + if (Yanfly.Param.JpMax > 0) { + this._jp[classId] = Math.min(Yanfly.Param.JpMax, value); + } + + + //---魔改--- v1.00 将忽略classId的参数调整 + if (Yanfly.Param.JpMax > 0)this._ZzyCYTPJP = Math.min(Yanfly.Param.JpMax, value); + else this._ZzyCYTPJP = value; +}; + +Game_Actor.prototype.jpRate = function() //jp增加的倍数 +{ + var rate = 1.0; + rate *= this.actor().jpRate; + rate *= this.currentClass().jpRate; + var equips = this.equips(); + for (var i = 0; i < equips.length; i++) { + var item = equips[i]; + if (item) rate *= item.jpRate; + } + var states = this.states(); + for (var i = 0; i < states.length; i++) { + var state = states[i]; + if (state) rate *= state.jpRate; + } + return rate; +}; + +Game_Actor.prototype.gainJp = function(value, classId) +{ + value = parseInt(value); + if (value === NaN) value = 0; + classId = classId || this.currentClass().id; + value = Math.floor(value * this.jpRate()); + if ($gameParty.inBattle()) { + this._battleJp = this._battleJp || 0; + this._battleJp += value; + } + + this.setJp(this.jp(classId) + value, classId); + if (classId === this.currentClass().id && this.isSublcassEarnJp()) + { + + this.gainJpSubclass(value); + } +}; + +Game_Actor.prototype.isSublcassEarnJp = function() { + if (!Imported.YEP_X_Subclass) return false; + if (!this.subclass()) return false; + return Yanfly.Param.SubclassJp; +}; + +Game_Actor.prototype.gainJpSubclass = function(value) { + var classId = this.subclass().id; + value = Math.round(value * Yanfly.Param.SubclassJp); + this.setJp(this.jp(classId) + value, classId); +}; + +Game_Actor.prototype.loseJp = function(value, classId) { + classId = classId || this.currentClass().id; + this.setJp(this.jp(classId) - value, classId); +}; + +Game_Actor.prototype.battleJp = function() { + this._battleJp = this._battleJp || 0; + return this._battleJp; +}; + +Yanfly.JP.Game_Actor_changeClass = Game_Actor.prototype.changeClass; +Game_Actor.prototype.changeClass = function(classId, keepExp) { + this._preventJpLevelUpGain = true; + Yanfly.JP.Game_Actor_changeClass.call(this, classId, keepExp); + this._preventJpLevelUpGain = false; +}; + +Yanfly.JP.Game_Actor_levelUp = Game_Actor.prototype.levelUp; +Game_Actor.prototype.levelUp = function() { + Yanfly.JP.Game_Actor_levelUp.call(this); + if (this._preventJpLevelUpGain) return; + var user = this; + var target = this; + var a = this; + var b = this; + var level = this.level; + var code = Yanfly.Param.JpPerLevel; + try { + var value = eval(code) + } catch (e) { + var value = 0; + Yanfly.Util.displayError(e, code, 'LEVEL UP JP FORMULA ERROR'); + } + + + this.gainJp(value, this.currentClass().id); +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +Game_Enemy.prototype.jp = function() { + var user = this; + var target = this; + var a = this; + var b = this; + var code = this.enemy().jp; + try { + return eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, 'ENEMY JP FORMULA ERROR'); + return 0; + } +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Yanfly.JP.Game_Action_applyItemUserEffect = + Game_Action.prototype.applyItemUserEffect; +Game_Action.prototype.applyItemUserEffect = function(target) { + Yanfly.JP.Game_Action_applyItemUserEffect.call(this, target); + if (target) this.applyItemJpEffect(target); +}; + +Game_Action.prototype.applyItemJpEffect = function(target) { + var item = this.item(); + if (!item) return; + if (target.isActor()) target.gainJp(item.targetGainJp); +}; + +Yanfly.JP.Game_Action_hasItemAnyValidEffects = + Game_Action.prototype.hasItemAnyValidEffects; +Game_Action.prototype.hasItemAnyValidEffects = function(target) { + var item = this.item(); + if (!item) return; + if (target.isActor() && item.targetGainJp !== 0) return true; + return Yanfly.JP.Game_Action_hasItemAnyValidEffects.call(this, target); +}; + +//============================================================================= +// Game_Troop +//============================================================================= + +Game_Troop.prototype.jpTotal = function() { + return this.deadMembers().reduce(function(r, enemy) { + return r + enemy.jp(); + }, 0); +}; + +//============================================================================= +// Game_Interpreter +//============================================================================= + +Yanfly.JP.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args) { + Yanfly.JP.Game_Interpreter_pluginCommand.call(this, command, args) + if (command === 'gainJp') this.modifyJp('gain', args); + if (command === 'loseJp') this.modifyJp('lose', args); + if (command === 'setJp') this.modifyJp('set', args); +}; + +Game_Interpreter.prototype.modifyJp = function(type, args) { + if (!args) return; + var actorId = parseInt(args[0]); + var actor = $gameActors.actor(actorId); + var jpValue = args[1] || 0; + jpValue = parseInt(jpValue); + var classId = args[2] || 0; + classId = parseInt(classId); + if (jpValue <= 0) return; + if (classId <= 0) classId = actor.currentClass().id; + if (type === 'gain') { + actor.gainJp(jpValue, classId); + } else if (type === 'lose') { + actor.loseJp(jpValue, classId); + } else if (type === 'set') { + actor.setJp(jpValue, classId); + } +}; + +//============================================================================= +// Window_Base +//============================================================================= + +Yanfly.JP.Window_Base_dASS = Window_Base.prototype.drawActorSimpleStatus; +Window_Base.prototype.drawActorSimpleStatus = function(actor, wx, wy, ww) { + this._drawMenuJP = Yanfly.Param.JpShowMenu; + Yanfly.JP.Window_Base_dASS.call(this, actor, wx, wy, ww); + this._drawMenuJP = undefined; +}; + +Yanfly.JP.Window_Base_drawActorClass = Window_Base.prototype.drawActorClass; +Window_Base.prototype.drawActorClass = function(actor, wx, wy, ww) { + ww = ww || 168; + Yanfly.JP.Window_Base_drawActorClass.call(this, actor, wx, wy, ww); + if (!this._drawMenuJP) return; + var classId = actor.currentClass().id; + this.drawActorJp(actor, classId, wx, wy, ww, 'right'); +}; + +Window_Base.prototype.drawActorJp = function(actor, id, wx, wy, ww, align) { + var jp = actor.jp(id); + var icon = '\\i[' + Yanfly.Icon.Jp + ']'; + var fmt = Yanfly.Param.JpMenuFormat; + var text = fmt.format(Yanfly.Util.toGroup(jp), Yanfly.Param.Jp, icon); + if (align === 'left') { + wx = 0; + } else if (align === 'center') { + wx += (ww - this.textWidthEx(text)) / 2; + } else { + wx += ww - this.textWidthEx(text); + } + this.drawTextEx(text, wx, wy); +}; + +Window_Base.prototype.textWidthEx = function(text) { + return this.drawTextEx(text, 0, this.contents.height); +}; + +//============================================================================= +// Window_VictoryJp +//============================================================================= + +if (Imported.YEP_VictoryAftermath && Yanfly.Param.JpEnableAftermath) { + +function Window_VictoryJp() { + this.initialize.apply(this, arguments); +} + +Window_VictoryJp.prototype = Object.create(Window_VictoryExp.prototype); +Window_VictoryJp.prototype.constructor = Window_VictoryJp; + +Window_VictoryJp.prototype.drawActorGauge = function(actor, index) { + this.clearGaugeRect(index); + var rect = this.gaugeRect(index); + this.changeTextColor(this.normalColor()); + this.drawActorName(actor, rect.x + 2, rect.y); + this.drawLevel(actor, rect); + this.drawJpGained(actor, rect); +}; + +Window_VictoryJp.prototype.drawJpGained = function(actor, rect) { + var wy = rect.y + this.lineHeight() * 1; + this.changeTextColor(this.systemColor()); + this.drawText(Yanfly.Param.JpAftermathEarn, rect.x + 2, wy, rect.width - 4, + 'left'); + var bonusJp = 1.0 * actor.battleJp() * this._tick / + Yanfly.Param.VAGaugeTicks; + var value = Yanfly.Util.toGroup(parseInt(bonusJp)); + var fmt = Yanfly.Param.JpAftermathFmt; + var icon = '\\i[' + Yanfly.Icon.Jp + ']'; + var JpText = fmt.format(value, Yanfly.Param.Jp, icon); + this.changeTextColor(this.normalColor()); + wx = rect.x + rect.width - this.textWidthEx(JpText); + this.drawTextEx(JpText, wx, wy); +}; + +//============================================================================= +// Scene_Battle +//============================================================================= + +Yanfly.JP.Scene_Battle_addCustomVictorySteps = + Scene_Battle.prototype.addCustomVictorySteps; +Scene_Battle.prototype.addCustomVictorySteps = function(array) { + array = Yanfly.JP.Scene_Battle_addCustomVictorySteps.call(this, array); + if (!array.contains('JP')) array.push('JP'); + return array; +}; + +Yanfly.JP.Scene_Battle_updateVictorySteps = + Scene_Battle.prototype.updateVictorySteps; +Scene_Battle.prototype.updateVictorySteps = function() { + Yanfly.JP.Scene_Battle_updateVictorySteps.call(this); + if (this.isVictoryStep('JP')) this.updateVictoryJp(); +}; + +Scene_Battle.prototype.updateVictoryJp = function() { + if (!this._victoryJpWindow) { + this.createVictoryJp(); + } else if (this._victoryJpWindow.isReady()) { + if (this.victoryTriggerContinue()) this.finishVictoryJp(); + } +}; + +Scene_Battle.prototype.createVictoryJp = function() { + this._victoryTitleWindow.refresh(Yanfly.Param.JpAftermathText); + this._victoryJpWindow = new Window_VictoryJp(); + this.addWindow(this._victoryJpWindow); + this._victoryJpWindow.open(); +}; + +Scene_Battle.prototype.finishVictoryJp = function() { + SoundManager.playOk(); + this._victoryJpWindow.close(); + this.processNextVictoryStep(); +}; + +}; // Imported.YEP_VictoryAftermath + +//============================================================================= +// Utilities +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +if (!Yanfly.Util.toGroup) { + Yanfly.Util.toGroup = function(inVal) { + return inVal; + } +}; + +Yanfly.Util.displayError = function(e, code, message) { + console.log(message); + console.log(code || 'NON-EXISTENT'); + console.error(e); + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + if (!require('nw.gui').Window.get().isDevToolsOpen()) { + require('nw.gui').Window.get().showDevTools(); + } + } +}; + +//============================================================================= +// End of File +//============================================================================= + +Zzy.CYJP.SetJP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + value = value ? value : 0; + if(actor) + { + actor.setJp(value);return true; + } + return false; +} + + +Zzy.CYJP.GainJP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + value = value ? value : 0; + if(actor) + { + actor.gainJp(value);return true; + } + return false; +} + + +Zzy.CYJP.LoseJP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + value = value ? value : 0; + if(actor) + { + actor.loseJp(value);return true; + } + return false; +} + + +Zzy.CYJP.GetJP = function(actorId) +{ + var actor = $gameActors.actor(actorId); + if(actor)return actor.jp(); + return 0; +} diff --git a/js/plugins/YEP_SkillLearnSystem.js b/js/plugins/YEP_SkillLearnSystem.js index 01309c2..6accd7f 100644 --- a/js/plugins/YEP_SkillLearnSystem.js +++ b/js/plugins/YEP_SkillLearnSystem.js @@ -15,6 +15,21 @@ Yanfly.SLS.version = 1.13; * @plugindesc v1.13 技能学习系统☁️ * @author Yanfly Engine Plugins * + * @param ---魔改--- + * @default + * + * + * @param ShowGoldWindowFormat + * @text 显示金币窗口的文本 + * @desc 文本样式,其中%1会被替换为角色的JP值,%2会被替换为当前的金币数值,支持转义字符 + * @default %1\c[1]JP\i[188] \c[0]%2\c[1]金\i[313] + * + * + * + * + * + * + * * @param ---命令--- * @default * @@ -113,6 +128,14 @@ Yanfly.SLS.version = 1.13; * @default 100 * * @help + * + * 魔改作者: 流逝的岁月 + * 魔改版本: v1.00 + * + * 魔改内容: v1.00 将对界面进行调整 + * + * + * * ============================================================================ * Introduction * ============================================================================ @@ -314,6 +337,17 @@ Yanfly.SLS.version = 1.13; Yanfly.Parameters = PluginManager.parameters("YEP_SkillLearnSystem"); Yanfly.Param = Yanfly.Param || {}; + + +var Zzy = Zzy || {}; +Zzy.CYSLS = Zzy.CYSLS || {}; + + +Zzy.CYSLS.ShowGoldWindowFormat = Yanfly.Parameters['ShowGoldWindowFormat'] ? String(Yanfly.Parameters['ShowGoldWindowFormat']) : '%1\\c[1]JP\\i[188] \\c[0]%2\\c[1]金\\i[313]'; + + + + Yanfly.Param.SLSCommand = String(Yanfly.Parameters["Learn Command"]); Yanfly.Param.SLSShowLearn = String(Yanfly.Parameters["Show Command"]); Yanfly.Param.SLSShowLearn = eval(Yanfly.Param.SLSShowLearn); @@ -1473,7 +1507,10 @@ Scene_Skill.prototype.createSkillLearnWindow = function () { Scene_Skill.prototype.createGoldWindow = function () { if (!Yanfly.Param.SLSGoldWindow) return; var wx = Graphics.boxWidth / 2; - this._goldWindow = new Window_Gold(wx, 0); + + //---魔改--- v1.00 金币窗口修改 + + this._goldWindow = new Window_ZzyCYSLSGold(wx, 0); this._goldWindow.width = Graphics.boxWidth / 2; this._goldWindow.y = Graphics.boxHeight - this._goldWindow.height; this._skillTypeWindow.setGoldWindow(this._goldWindow); @@ -1726,7 +1763,10 @@ Scene_LearnSkill.prototype.createSkillLearnWindow = function () { Scene_LearnSkill.prototype.createGoldWindow = function () { if (!eval(Yanfly.Param.SLSGoldWindow)) return; var wx = Graphics.boxWidth / 2; - this._goldWindow = new Window_Gold(wx, 0); + + //---魔改--- v1.00 金币窗口修改 + + this._goldWindow = new Window_ZzyCYSLSGold(wx, 0); this._goldWindow.width = Graphics.boxWidth / 2; this._goldWindow.y = Graphics.boxHeight - this._goldWindow.height; this._goldWindow.createContents(); @@ -1874,6 +1914,76 @@ Scene_LearnSkill.prototype.onConfirmCancel = function () { this._skillLearnWindow.activate(); }; + +//---魔改--- v1.00 新的窗口类型 + +//============================================================================= +// Window_ZzyCYSLSGold +//============================================================================= + + +function Window_ZzyCYSLSGold() { + this.initialize.apply(this, arguments); +} + +Window_ZzyCYSLSGold.prototype = Object.create(Window_Gold.prototype); +Window_ZzyCYSLSGold.prototype.constructor = Window_ZzyCYSLSGold; + +Window_ZzyCYSLSGold.prototype.initialize = function(x, y) +{ + Window_Gold.prototype.initialize.call(this, x, y); +}; + + +Window_ZzyCYSLSGold.prototype.refresh = function() +{ + var x = this.textPadding(); + var width = this.contents.width - this.textPadding() * 2; + this.contents.clear(); + + //绘制文本信息 + var actor = SceneManager._scene.actor(); + var jp = actor.jp(); + var gold = $gameParty.gold(); + var tf = Zzy.CYSLS.ShowGoldWindowFormat;//获取文本格式 + var text = tf.format(jp,gold); + var wex = this.textWidthEx(text); + var ofx = 0; + if(wex > width)ofx = 0; + else + {ofx = (width-wex)/2;} + + //绘制JP--位于中心 + this.drawTextEx(text,x+ofx,0); +} + +Window_ZzyCYSLSGold.prototype.textWidthEx = function(text) //计算宽高 +{ + return this.drawTextEx(text, 0, this.contents.height); +}; + +//---魔改--- v1.00 关闭Scene_Skill界面下的Window_SkillStatus界面的JP绘制 +Window_SkillStatus.prototype.drawActorJp = function(actor, id, wx, wy, ww, align) +{ + if(SceneManager._scene instanceof Scene_Skill)return undefined;//不进行绘制 + + // var jp = actor.jp(id); + // var icon = '\\i[' + Yanfly.Icon.Jp + ']'; + // var fmt = Yanfly.Param.JpMenuFormat; + // var text = fmt.format(Yanfly.Util.toGroup(jp), Yanfly.Param.Jp, icon); + // if (align === 'left') { + // wx = 0; + // } else if (align === 'center') { + // wx += (ww - this.textWidthEx(text)) / 2; + // } else { + // wx += ww - this.textWidthEx(text); + // } + // this.drawTextEx(text, wx, wy); +}; + + + + //============================================================================= // Utilities //=============================================================================