From c9ba70fa9c24f332a527330c5967908680490c70 Mon Sep 17 00:00:00 2001 From: oc Date: Sat, 10 Mar 2018 01:09:07 +0800 Subject: [PATCH 1/4] Replay use full name --- libs/actions.js | 4 ++-- libs/control.js | 9 +++++++-- libs/events.js | 5 +++-- libs/utils.js | 49 ++++++++++++++++++++++++++----------------------- 4 files changed, 38 insertions(+), 29 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index aca775d9..e93d5238 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -185,8 +185,8 @@ actions.prototype.keyDown = function(keyCode) { } ////// 根据放开键的code来执行一系列操作 ////// -actions.prototype.keyUp = function(keyCode) { - if (core.isset(core.status.replay)&&core.status.replay.replaying) return; +actions.prototype.keyUp = function(keyCode, fromReplay) { + if (!fromReplay&&core.isset(core.status.replay)&&core.status.replay.replaying) return; if (core.status.lockControl) { core.status.holdingKeys = []; diff --git a/libs/control.js b/libs/control.js index 8e7a992e..ba257bbe 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1485,7 +1485,7 @@ control.prototype.replay = function () { core.events.openShop(shopId, false); var shopInterval = setInterval(function () { - if (!core.events.clickShop(6, topIndex+core.status.event.selection)) { + if (!core.actions.clickShop(6, topIndex+core.status.event.selection)) { clearInterval(shopInterval); core.stopReplay(); core.drawTip("录像文件出错"); @@ -1493,7 +1493,7 @@ control.prototype.replay = function () { } if (selections.length==0) { clearInterval(shopInterval); - core.events.clickShop(6, topIndex+choices.length); + core.actions.clickShop(6, topIndex+choices.length); core.replay(); return; } @@ -1535,6 +1535,11 @@ control.prototype.replay = function () { return; } } + else if (action.indexOf('key:')==0) { + core.actions.keyUp(parseInt(action.substring(4)), true); + core.replay(); + return; + } core.stopReplay(); core.insertAction("录像文件出错"); diff --git a/libs/events.js b/libs/events.js index 91a81d5a..58dae299 100644 --- a/libs/events.js +++ b/libs/events.js @@ -224,9 +224,10 @@ events.prototype.doAction = function() { // 事件处理完毕 if (core.status.event.data.list.length==0) { + var callback = core.status.event.data.callback; core.ui.closePanel(); - if (core.isset(core.status.event.data.callback)) - core.status.event.data.callback(); + if (core.isset(callback)) + callback(); core.replay(); return; } diff --git a/libs/utils.js b/libs/utils.js index 5ad4a9de..56929077 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -158,8 +158,6 @@ utils.prototype.encodeRoute = function (route) { var ans=""; var lastMove = "", cnt=0; - var items=Object.keys(core.material.items).sort(); - var shops=Object.keys(core.initStatus.shops).sort(); route.forEach(function (t) { if (t=='up' || t=='down' || t=='left' || t=='right') { if (t!=lastMove && cnt>0) { @@ -177,15 +175,13 @@ utils.prototype.encodeRoute = function (route) { cnt=0; } if (t.indexOf('item:')==0) - ans+="I"+items.indexOf(t.substring(5)); + ans+="I"+t.substring(5)+":"; else if (t.indexOf('fly:')==0) - ans+="F"+core.floorIds.indexOf(t.substring(4)); + ans+="F"+t.substring(4)+":"; else if (t.indexOf('choices:')==0) ans+="C"+t.substring(8); - else if (t.indexOf('shop:')==0) { - var sp=t.substring(5).split(":"); - ans+="S"+shops.indexOf(sp[0])+":"+sp[1]; - } + else if (t.indexOf('shop:')==0) + ans+="S"+t.substring(5); else if (t=='turn') ans+='T'; else if (t=='getNext') @@ -194,9 +190,10 @@ utils.prototype.encodeRoute = function (route) { ans+="P"+t.substring(6); else if (t=='no') ans+='N'; - else if (t.indexOf('move:')==0) { + else if (t.indexOf('move:')==0) ans+="M"+t.substring(5); - } + else if (t=='key:') + ans+='K'+t.substring(4); } }); if (cnt>0) { @@ -221,27 +218,33 @@ utils.prototype.decodeRoute = function (route) { if (num.length==0) num="1"; return core.isset(noparse)?num:parseInt(num); } + var getString = function () { + var str=""; + while (index Date: Sat, 10 Mar 2018 15:11:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 启动服务.exe | Bin 53760 -> 53760 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/启动服务.exe b/启动服务.exe index 2ec60d8847cd11fef47d1f63c249f6055dfff041..2c84bd69c04a56c4aaaddc21c6d4847eb135f2c9 100644 GIT binary patch delta 1584 zcmY+^TTB#J7zgnG+;(TTuw6O>?z&Q>7#q2`+_sBcT4k5o7OEsbCp(P=LeQ7DiD8$}EYQH&iUVJ&bzwdu$ z&NpW+y(3cZh&0$QJzRa^(($80()d(Gy=ly+Tm zVw#P=Xs-xP2)a4?^)$(aMm?lEv0tx#%!vV3Kh4H*ec9o{4ZTft;Wsv}82*q?isWXQ ztH-ca+JsSREn@v|jxN9uwPrHD_KCWcdT6LFLj(Yf;UW zA)iD#+VaeqeaMy1U>%P0^=92O(t4-`wA0o#eTAoSu7C+GvI`sFE@V#*!2 zrE?vnEE5~JKBO!Y`CLPkWuchsJY`u3ag9=zjmkop>qk|C!fe#?a8jN`4w|^85fHew&woP3?sV~O1uKSr3YVUd>b;}}y6mD-HtM_s_WB$sW1HgE@t){m;GHXm^> z53?!ELpxU)WqCNrH7XYg`G{~Cav7BsJhm^ljyfXwuvPO@~J276DYxRTxab*(hFP{?W<6VYOZhW`J^UG_|YB_%FrJ) zTkFHm_NeeIX1RVRZAMQKYdgXgEJrWnFsjs3LOK3uWFgB!_1{cT0M`d{FTC38BF`=DCJ;6mAP@?rHt-`C?A+c4s z?0%2_@6!g92C-WkQnrZZliDYq&_1ThuqM-ZUOOesh-Pc%{L9LW__a2r+@^{T3!?c< zB(dlFKC6UrSG%SBBf9lPWevtMh5L#_8WR*-5{)i+rO)&#n^*c)ud`jCwi<1DRBy3u zksL;S^>#TiB^el}eKSAW0mG=R*VL+xj?UM2?S9K}v}B1!;LW*OxA(z7cW5ai^yNoN z^X=tN-Nw4fal859kI!B6uKx3>p_SCk@$%8qirDlg2Y05>xtfccc6WBhz2E&6%e5Qs I@9#PO2j;d*=>Px# delta 1538 zcmY+^ZA=_R7zgnGzTE9{h3l1FSW}wSK#B?d&=>qrHL=E^2GG=`zND#8W3`F;?CgB$m%01x ze|Dak*`4hjlX}Ob!K2dZ4|^^gJ0h&QwF|hD00aOl0eiQRCwd&h-DD{Bplxjwa3nuT zJz$ilE&5AZGJyPs&b_gY7xz(j)D{7YjdZQ40p2*^qHFmzO^-+Dcass?a$2l=S9{j( zz@&Cva^Mncztoxq2kx=9K+ln!cv`R09f;}mD;!AZW_paZ=k?_jC$8x2q7(D1T{a5C z9w{CyHmeVzMv5W>_qeu`9>S>C%GyYoc&@}$!aXTC;YK^t2)d;mq%p1mrnv`t{`i3I zTEZpi1-fq{UTT$?m)enqfihMCze}C);4P*h{3-QdHEweKEA=89YPs3-vLMU-$bpMX zC*`7Y#dhET1|NoClz-dd8=K8v2yy+So+CxLZmSnawM-*wddd|cf*4c6{iJ!CBWPf>N<`ph2go|< z5#(CJ!m0yu1R<^^(xZ6YIx%cAk72;*-ggMcin%V!NZBCp>-mlA6e%9t~ ze~U^or#>_5j9zQclBV<~`&p{B)9#Zdg*N+E2}WIgot&1I0Zh@>nBQWr@loS;%~;V^ zBpQ`3EjGGt-2U#HcdiviKdv|!4eov4Ypj`>Qq0eIa^Y%L-pay`-lolKqbGlTOZA$C`_Jilj8OV>VsxzC?WzxJ2mn!S_qKl*Dvz5oCK From 184740e3cf3db52a767f691db75068ca6f3992c0 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sat, 10 Mar 2018 18:36:25 +0800 Subject: [PATCH 3/4] Add Point --- libs/enemys.js | 5 +- libs/ui.js | 23 +++++++- libs/utils.js | 7 ++- project/comment.js | 6 +- project/data.comment.js | 3 +- project/data.js | 45 ++++++--------- project/enemys.js | 120 ++++++++++++++++++++-------------------- project/functions.js | 2 +- 8 files changed, 110 insertions(+), 101 deletions(-) diff --git a/libs/enemys.js b/libs/enemys.js index 7a744b53..7f6156ed 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -252,13 +252,12 @@ enemys.prototype.getCurrentEnemys = function (floorId) { var monster = core.material.enemys[monsterId]; var mon_hp = monster.hp, mon_atk = monster.atk, mon_def = monster.def; - // 坚固 - if (this.hasSpecial(monster.special, 3) && mon_def < core.status.hero.atk - 1) - mon_def = core.status.hero.atk - 1; if (this.hasSpecial(monster.special, 10)) { mon_atk=core.status.hero.atk; mon_def=core.status.hero.def; } + if (this.hasSpecial(monster.special, 3) && mon_def < core.status.hero.atk - 1) + mon_def = core.status.hero.atk - 1; var specialText = core.enemys.getSpecialText(monsterId); if (specialText.length>=3) specialText = "多属性..."; diff --git a/libs/ui.js b/libs/ui.js index b100b309..658d42a5 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1193,24 +1193,41 @@ ui.prototype.drawBook = function (index) { core.fillText('ui', '防御', 335, 62 * i + 32, '#DDDDDD', '13px Verdana'); core.fillText('ui', enemy.def, 365, 62 * i + 32, '#DDDDDD', 'bold 13px Verdana'); - var expOffset = 165; + var expOffset = 165, line_cnt=0; if (core.flags.enableMoney) { core.fillText('ui', '金币', 165, 62 * i + 50, '#DDDDDD', '13px Verdana'); core.fillText('ui', enemy.money, 195, 62 * i + 50, '#DDDDDD', 'bold 13px Verdana'); expOffset = 255; + line_cnt++; } - if (core.flags.enableExperience) { + // 加点 + if (core.flags.enableAddPoint) { + core.canvas.ui.textAlign = "left"; + core.fillText('ui', '加点', expOffset, 62 * i + 50, '#DDDDDD', '13px Verdana'); + core.fillText('ui', enemy.point, expOffset + 30, 62 * i + 50, '#DDDDDD', 'bold 13px Verdana'); + expOffset = 255; + line_cnt++; + } + + if (core.flags.enableExperience && line_cnt<2) { core.canvas.ui.textAlign = "left"; core.fillText('ui', '经验', expOffset, 62 * i + 50, '#DDDDDD', '13px Verdana'); core.fillText('ui', enemy.experience, expOffset + 30, 62 * i + 50, '#DDDDDD', 'bold 13px Verdana'); + line_cnt++; } + var damageOffset = 281; + if (line_cnt==1) damageOffset=326; + if (line_cnt==2) damageOffset=361; + + /* var damageOffet = 281; if (core.flags.enableMoney && core.flags.enableExperience) damageOffet = 361; else if (core.flags.enableMoney || core.flags.enableExperience) damageOffet = 326; + */ core.canvas.ui.textAlign = "center"; @@ -1219,7 +1236,7 @@ ui.prototype.drawBook = function (index) { if (damage >= core.status.hero.hp) color = '#FF0000'; if (damage <= 0) color = '#00FF00'; if (damage >= 999999999) damage = '无法战斗'; - core.fillText('ui', damage, damageOffet, 62 * i + 50, color, 'bold 13px Verdana'); + core.fillText('ui', damage, damageOffset, 62 * i + 50, color, 'bold 13px Verdana'); core.canvas.ui.textAlign = "left"; diff --git a/libs/utils.js b/libs/utils.js index 56929077..29adb15a 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -223,6 +223,7 @@ utils.prototype.decodeRoute = function (route) { while (index0)||thiseval==null)$end', 'bomb':' 加入 "bomb": false 代表该怪物不可被炸弹或圣锤炸掉\n$select({\"values\":[true,false]})$end', - 'point': 'point可以在打败怪物后进行加点,详见文档说明\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', 'n': '多连击需要在后面指定n代表是几连击\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', 'atkValue':'退化时勇士下降的攻击力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', 'defValue':'退化时勇士下降的防御力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', diff --git a/project/data.comment.js b/project/data.comment.js index 8afb46af..5fc22fd5 100644 --- a/project/data.comment.js +++ b/project/data.comment.js @@ -160,7 +160,8 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "bigKeyIsBox": " 如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙 \n$select({\"values\":[true,false]})$end", "equipment": " 剑和盾是否直接作为装备。如果此项为true,则作为装备,需要在道具栏使用,否则将直接加属性。 \n$select({\"values\":[true,false]})$end", "enableDeleteItem": " 是否允许删除(丢弃)道具 \n$select({\"values\":[true,false]})$end", - "enableNegativeDamage": " /****** 怪物相关 ******/ \n 是否支持负伤害(回血) \n$select({\"values\":[true,false]})$end", + "enableAddPoint": " /****** 怪物相关 ******/ \n 是否支持加点 \n$select({\"values\":[true,false]})$end", + "enableNegativeDamage": "是否支持负伤害(回血) \n$select({\"values\":[true,false]})$end", "hatredDecrease": " 是否在和仇恨怪战斗后减一半的仇恨值,此项为false则和仇恨怪不会扣减仇恨值。 \n$select({\"values\":[true,false]})$end", "betweenAttackCeil": " 夹击方式是向上取整还是向下取整。如果此项为true则为向上取整,为false则为向下取整 \n$select({\"values\":[true,false]})$end", "startDirectly": " /****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面 \n$select({\"values\":[true,false]})$end", diff --git a/project/data.js b/project/data.js index 52d5d324..b63f74fc 100644 --- a/project/data.js +++ b/project/data.js @@ -145,17 +145,14 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = ] }, - "values" : { - - "HPMAX": 999999, // 各种数值;一些数值可以在这里设置 + "values" : { // 各种数值;一些数值可以在这里设置 /****** 角色相关 ******/ - // HP上限;-1则无上限 + "HPMAX": 999999, // HP上限;-1则无上限 "lavaDamage": 100, // 经过血网受到的伤害 "poisonDamage": 10, // 中毒后每步受到的伤害 "weakValue": 20, // 衰弱状态下攻防减少的数值 - - "redJewel": 3, /****** 道具相关 ******/ - // 红宝石加攻击的数值 + /****** 道具相关 ******/ + "redJewel": 3, // 红宝石加攻击的数值 "blueJewel": 3, // 蓝宝石加防御的数值 "greenJewel": 5, // 绿宝石加魔防的数值 "redPotion": 100, // 红血瓶加血数值 @@ -175,22 +172,18 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "sword5": 160, // 神圣剑加攻数值 "shield5": 160, // 神圣盾加防数值 "moneyPocket": 500, // 金钱袋加金币的数值 - - 'breakArmor': 0.9, /****** 怪物相关 ******/ - // 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害) + /****** 怪物相关 ******/ + 'breakArmor': 0.9, // 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害) 'counterAttack': 0.1, // 反击的比例(战斗时,怪物每回合附加角色攻击的x%作为伤害,无视角色防御) 'purify': 3, // 净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害) 'hatred': 2, // 仇恨属性中,每杀死一个怪物获得的仇恨值 - - 'animateSpeed': 500, /****** 系统相关 ******/ - // 动画时间 + /****** 系统相关 ******/ + 'animateSpeed': 500, // 动画时间 }, - "flags" : { - - "enableFloor": true, // 系统FLAG,在游戏运行中中请不要修改它。 + "flags" : { // 系统FLAG,在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ - // 是否在状态栏显示当前楼层 + "enableFloor": true, // 是否在状态栏显示当前楼层 "enableLv": true, // 是否在状态栏显示当前等级 "enableMDef": true, // 是否在状态栏及战斗界面显示魔防(护盾) "enableMoney": true, // 是否在状态栏、怪物手册及战斗界面显示金币 @@ -198,22 +191,20 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "enableLevelUp": true, // 是否允许等级提升(进阶);如果上面enableExperience为false,则此项恒视为false "enableDebuff": true, // 是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 ////// - - "flyNearStair": true, /****** 道具相关 ******/ - // 是否需要在楼梯边使用传送器 + /****** 道具相关 ******/ + "flyNearStair": true, // 是否需要在楼梯边使用传送器 "pickaxeFourDirections": true, // 使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁 "bombFourDirections": true, // 使用炸弹是否四个方向都会炸;如果false则只炸面前的怪物(即和圣锤等价) "bigKeyIsBox": false, // 如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙 "equipment": false, // 剑和盾是否直接作为装备。如果此项为true,则作为装备,需要在道具栏使用,否则将直接加属性。 "enableDeleteItem": true, // 是否允许删除(丢弃)道具 - - "enableNegativeDamage": true, /****** 怪物相关 ******/ - // 是否支持负伤害(回血) + /****** 怪物相关 ******/ + "enableAddPoint": false, // 是否支持加点 + "enableNegativeDamage": true, // 是否支持负伤害(回血) "hatredDecrease": true, // 是否在和仇恨怪战斗后减一半的仇恨值,此项为false则和仇恨怪不会扣减仇恨值。 "betweenAttackCeil": false, // 夹击方式是向上取整还是向下取整。如果此项为true则为向上取整,为false则为向下取整 - - "startDirectly": false, /****** 系统相关 ******/ - // 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面 + /****** 系统相关 ******/ + "startDirectly": false, // 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面 "canOpenBattleAnimate": true, // 是否允许用户开启战斗过程;如果此项为false,则下面两项均强制视为false "showBattleAnimateConfirm": true, // 是否在游戏开始时提供“是否开启战斗动画”的选项 "battleAnimate": true, // 是否默认显示战斗动画;用户可以手动在菜单栏中开关 @@ -222,7 +213,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "enableGentleClick": true, // 是否允许轻触(获得面前物品) "potionWhileRouting": false, // 寻路算法是否经过血瓶;如果该项为false,则寻路算法会自动尽量绕过血瓶 "enableViewMaps": true, // 是否支持在菜单栏中查看所有楼层的地图 - "portalWithoutTrigger": true, // 经过楼梯、传送门时是否能“穿透”。穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件 + "portalWithoutTrigger": true, // 是否支持穿透。所谓穿透,即当自动寻路经过楼梯时,不触发楼层转换事件而是穿过它。 "enableMoveDirectly": true, // 是否允许瞬间移动 } } \ No newline at end of file diff --git a/project/enemys.js b/project/enemys.js index fdc50724..1ee04c40 100644 --- a/project/enemys.js +++ b/project/enemys.js @@ -1,63 +1,63 @@ enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = { - 'greenSlime': {'name': '绿头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 1, 'experience': 1, 'special': [1,5,7,8]}, - 'redSlime': {'name': '红头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'blackSlime': {'name': '青头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'slimelord': {'name': '怪王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'special': [1,9]}, - 'bat': {'name': '小蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 2, 'experience': 0, 'special': 1}, - 'bigBat': {'name': '大蝙蝠', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redBat': {'name': '红蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 5, 'experience': 0, 'special': 4}, - 'vampire': {'name': '冥灵魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'skeleton': {'name': '骷髅人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'skeletonSoilder': {'name': '骷髅士兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'skeletonCaptain': {'name': '骷髅队长', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'ghostSkeleton': {'name': '冥队长', 'hp': 100, 'atk': 120, 'def': 0, 'money': 8, 'experience': 0, 'special': 7}, - 'zombie': {'name': '兽人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'zombieKnight': {'name': '兽人武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'rock': {'name': '石头人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 4, 'experience': 0, 'special': 3}, - 'slimeMan': {'name': '影子战士', 'hp': 100, 'atk': 0, 'def': 0, 'money': 11, 'experience': 0, 'special': [10,21], 'atkValue': 2, 'defValue': 3}, // 退化怪可以在后面写atkValue和defValue表示退化的数值 - 'bluePriest': {'name': '初级法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 3, 'experience': 0, 'special': 2, 'point': 1}, // 'point'可以在打败怪物后进行加点,详见文档说明。 - 'redPriest': {'name': '高级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'brownWizard': {'name': '初级巫师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 16, 'experience': 0, 'special': 15, 'value': 100, 'range': 2}, // 领域怪需要加value表示领域伤害的数值;range可选,代表领域伤害的范围;不加默认为1 - 'redWizard': {'name': '高级巫师', 'hp': 1000, 'atk': 1200, 'def': 0, 'money': 160, 'experience': 0, 'special': 15, 'value': 200, 'zoneSquare': true}, // zoneSquare可选,代表是否九宫格伤害,true为是九宫格伤害,false或不设置为十字伤害 - 'yellowGuard': {'name': '初级卫兵', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'special': 0}, - 'blueGuard': {'name': '中级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redGuard': {'name': '高级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'special': [5,23]}, - 'soldier': {'name': '冥战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'yellowKnight': {'name': '金骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redKnight': {'name': '红骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'darkKnight': {'name': '黑骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'blackKing': {'name': '黑衣魔王', 'hp': 1000, 'atk': 500, 'def': 0, 'money': 1000, 'experience': 1000, 'special': 0, 'bomb': false}, // 加入 'bomb': false 代表该怪物不可被炸弹或圣锤炸掉 - 'yellowKing': {'name': '黄衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'greenKing': {'name': '青衣武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'blueKnight': {'name': '蓝骑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 9, 'experience': 0, 'special': 8}, - 'goldSlime': {'name': '黄头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'poisonSkeleton': {'name': '紫骷髅', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'poisonBat': {'name': '紫蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 14, 'experience': 0, 'special': 13}, - 'steelRock': {'name': '铁面人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'skeletonPriest': {'name': '骷髅法师', 'hp': 100, 'atk': 100, 'def': 0, 'money': 0, 'experience': 0, 'special': 18, 'value': 20}, - 'skeletonKing': {'name': '骷髅王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'skeletonWizard': {'name': '骷髅巫师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redSkeletonCaption': {'name': '骷髅武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'badHero': {'name': '迷失勇者', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'demon': {'name': '魔神武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'demonPriest': {'name': '魔神法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'goldHornSlime': {'name': '金角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redKing': {'name': '红衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'special': 16}, - 'blackMagician': {'name': '黑暗大法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 12, 'experience': 0, 'special': 11, 'value': 1/3, 'add': true, 'bomb': false}, // 吸血怪需要在后面添加value代表吸血比例;添加add: true可以将吸血的伤害加到自身 - 'silverSlime': {'name': '银头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 15, 'experience': 0, 'special': 14}, - 'swordEmperor': {'name': '剑圣', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'whiteHornSlime': {'name': '尖角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'badPrincess': {'name': '痛苦魔女', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'badFairy': {'name': '黑暗仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'grayPriest': {'name': '中级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'redSwordsman': {'name': '剑王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 7, 'experience': 0, 'special': 6, 'n': 8}, // 多连击需要在后面指定n代表是几连击 - 'whiteGhost': {'name': '水银战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'poisonZombie': {'name': '绿兽人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 13, 'experience': 0, 'special': 12}, - 'magicDragon': {'name': '魔龙', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'octopus': {'name': '血影', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'darkFairy': {'name': '仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, - 'greenKnight': {'name': '强盾骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, + 'greenSlime': {'name': '绿头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 1, 'experience': 1, 'point': 0, 'special': [1,5,7,8]}, + 'redSlime': {'name': '红头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'blackSlime': {'name': '青头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'slimelord': {'name': '怪王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': [1,9]}, + 'bat': {'name': '小蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 2, 'experience': 0, 'point': 0, 'special': 1}, + 'bigBat': {'name': '大蝙蝠', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redBat': {'name': '红蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 5, 'experience': 0, 'point': 0, 'special': 4}, + 'vampire': {'name': '冥灵魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'skeleton': {'name': '骷髅人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'skeletonSoilder': {'name': '骷髅士兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'skeletonCaptain': {'name': '骷髅队长', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'ghostSkeleton': {'name': '冥队长', 'hp': 100, 'atk': 120, 'def': 0, 'money': 8, 'experience': 0, 'point': 0, 'special': 7}, + 'zombie': {'name': '兽人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'zombieKnight': {'name': '兽人武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'rock': {'name': '石头人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 4, 'experience': 0, 'point': 0, 'special': 3}, + 'slimeMan': {'name': '影子战士', 'hp': 100, 'atk': 0, 'def': 0, 'money': 11, 'experience': 0, 'point': 0, 'special': [10,21], 'atkValue': 2, 'defValue': 3}, // 退化怪可以在后面写atkValue和defValue表示退化的数值 + 'bluePriest': {'name': '初级法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 3, 'experience': 0, 'point': 1, 'special': 2}, + 'redPriest': {'name': '高级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'brownWizard': {'name': '初级巫师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 16, 'experience': 0, 'point': 0, 'special': 15, 'value': 100, 'range': 2}, // 领域怪需要加value表示领域伤害的数值;range可选,代表领域伤害的范围;不加默认为1 + 'redWizard': {'name': '高级巫师', 'hp': 1000, 'atk': 1200, 'def': 0, 'money': 160, 'experience': 0, 'point': 0, 'special': 15, 'value': 200, 'zoneSquare': true}, // zoneSquare可选,代表是否九宫格伤害,true为是九宫格伤害,false或不设置为十字伤害 + 'yellowGuard': {'name': '初级卫兵', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': 0}, + 'blueGuard': {'name': '中级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redGuard': {'name': '高级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'point': 0, 'special': [5,23]}, + 'soldier': {'name': '冥战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'yellowKnight': {'name': '金骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redKnight': {'name': '红骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'darkKnight': {'name': '黑骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'blackKing': {'name': '黑衣魔王', 'hp': 1000, 'atk': 500, 'def': 0, 'money': 1000, 'experience': 1000, 'point': 0, 'special': 0, 'bomb': false}, // 加入 'bomb': false 代表该怪物不可被炸弹或圣锤炸掉 + 'yellowKing': {'name': '黄衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'greenKing': {'name': '青衣武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'blueKnight': {'name': '蓝骑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 9, 'experience': 0, 'point': 0, 'special': 8}, + 'goldSlime': {'name': '黄头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'poisonSkeleton': {'name': '紫骷髅', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'poisonBat': {'name': '紫蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 14, 'experience': 0, 'point': 0, 'special': 13}, + 'steelRock': {'name': '铁面人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'skeletonPriest': {'name': '骷髅法师', 'hp': 100, 'atk': 100, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 18, 'value': 20}, + 'skeletonKing': {'name': '骷髅王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'skeletonWizard': {'name': '骷髅巫师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redSkeletonCaption': {'name': '骷髅武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'badHero': {'name': '迷失勇者', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'demon': {'name': '魔神武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'demonPriest': {'name': '魔神法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'goldHornSlime': {'name': '金角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redKing': {'name': '红衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'point': 0, 'special': 16}, + 'blackMagician': {'name': '黑暗大法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 12, 'experience': 0, 'point': 0, 'special': 11, 'value': 1/3, 'add': true, 'bomb': false}, // 吸血怪需要在后面添加value代表吸血比例;添加add: true可以将吸血的伤害加到自身 + 'silverSlime': {'name': '银头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 15, 'experience': 0, 'point': 0, 'special': 14}, + 'swordEmperor': {'name': '剑圣', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'whiteHornSlime': {'name': '尖角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'badPrincess': {'name': '痛苦魔女', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'badFairy': {'name': '黑暗仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'grayPriest': {'name': '中级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'redSwordsman': {'name': '剑王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 7, 'experience': 0, 'point': 0, 'special': 6, 'n': 8}, // 多连击需要在后面指定n代表是几连击 + 'whiteGhost': {'name': '水银战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'poisonZombie': {'name': '绿兽人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 13, 'experience': 0, 'point': 0, 'special': 12}, + 'magicDragon': {'name': '魔龙', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'octopus': {'name': '血影', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'darkFairy': {'name': '仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + 'greenKnight': {'name': '强盾骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, } \ No newline at end of file diff --git a/project/functions.js b/project/functions.js index 20059376..e57a38d7 100644 --- a/project/functions.js +++ b/project/functions.js @@ -72,7 +72,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = "addPoint" : function (enemy) { // 加点事件 var point = enemy.point; - if (!core.isset(point) || point<=0) return []; + if (!core.flags.enableAddPoint || !core.isset(point) || point<=0) return []; // 加点,返回一个choices事件 return [ From ce0e80c4fa6170522028b747026f92411fe872bb Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sat, 10 Mar 2018 18:48:31 +0800 Subject: [PATCH 4/4] drawText & replay --- libs/ui.js | 2 +- project/data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ui.js b/libs/ui.js index 658d42a5..7160ebf4 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -219,7 +219,7 @@ ui.prototype.drawText = function (contents, callback) { if (core.isset(contents)) { // 合并 - if (core.isset(core.status.event)&&core.status.event.id=='action') { + if ((core.isset(core.status.event)&&core.status.event.id=='action') || (core.isset(core.status.replay)&&core.status.replay.replaying)) { core.insertAction(contents,null,null,callback); return; } diff --git a/project/data.js b/project/data.js index b63f74fc..f1ffcbc6 100644 --- a/project/data.js +++ b/project/data.js @@ -135,7 +135,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = {"need": 40, "effect": function () { - core.drawText("恭喜升级!"); + core.insertAction("恭喜升级!"); core.status.hero.hp *= 2; core.status.hero.atk += 100; core.status.hero.def += 100;