0.0.8-alpha5
・ 変数名を修正
・ スペースの有無を統一
@@ -76,14 +76,14 @@ | ||
76 | 76 | hist : [], |
77 | 77 | adventurer : null, // Player |
78 | 78 | size : { |
79 | - Window : {width:Number.NaN, height:Number.NaN}, | |
80 | - Main : {width:Number.NaN, height:Number.NaN}, // Input, Message, Map, Status | |
81 | - Input : {width:Number.NaN, height:Number.NaN}, // 入力欄 | |
82 | - Message : {width:Number.NaN, height:Number.NaN}, // メッセージ欄(入力上部) | |
83 | - Map : {width:Number.NaN, height:Number.NaN}, // マップ | |
84 | - Status : {width:Number.NaN, height:Number.NaN}, // ステータス | |
85 | - Infomation : {width:Number.NaN, height:Number.NaN}, // 情報出力(インベントリの内容など) | |
86 | - Debug : {width:Number.NaN, height:Number.NaN} // デバッグ情報 | |
79 | + Window : {width : Number.NaN, height : Number.NaN}, | |
80 | + Main : {width : Number.NaN, height : Number.NaN}, // Input, Message, Map, Status | |
81 | + Input : {width : Number.NaN, height : Number.NaN}, // 入力欄 | |
82 | + Message : {width : Number.NaN, height : Number.NaN}, // メッセージ欄(入力上部) | |
83 | + Map : {width : Number.NaN, height : Number.NaN}, // マップ | |
84 | + Status : {width : Number.NaN, height : Number.NaN}, // ステータス | |
85 | + Infomation : {width : Number.NaN, height : Number.NaN}, // 情報出力(インベントリの内容など) | |
86 | + Debug : {width : Number.NaN, height : Number.NaN} // デバッグ情報 | |
87 | 87 | } |
88 | 88 | }, |
89 | 89 |
@@ -153,7 +153,7 @@ | ||
153 | 153 | symbolName : 'symbolName', |
154 | 154 | alphabet : 'alphabet', |
155 | 155 | actObjectList : 'actObjectList', |
156 | - active : 'active', | |
156 | + isActive : 'isActive', | |
157 | 157 | ct : 'ct', |
158 | 158 | maxct : 'maxct', |
159 | 159 | dex : 'dex', |
@@ -173,8 +173,8 @@ | ||
173 | 173 | // Override |
174 | 174 | // |
175 | 175 | |
176 | -//noinspection JSUnusedGlobalSymbols | |
177 | -window.onload = function(onload) { | |
176 | +//noinspection JSUnusedGlobalSymbols,JSValidateTypes | |
177 | +window.onload = function (onload) { | |
178 | 178 | return function () { |
179 | 179 | if (!!onload) { |
180 | 180 | onload(); |
@@ -184,8 +184,8 @@ | ||
184 | 184 | }(window.onload); |
185 | 185 | |
186 | 186 | //noinspection JSUnusedGlobalSymbols |
187 | -window.onresize = function(onresize) { | |
188 | - return function() { | |
187 | +window.onresize = function (onresize) { | |
188 | + return function () { | |
189 | 189 | |
190 | 190 | if (!!onresize) { |
191 | 191 | onresize(); |
@@ -226,8 +226,8 @@ | ||
226 | 226 | |
227 | 227 | |
228 | 228 | //noinspection JSUnusedGlobalSymbols |
229 | -document.onkeypress = function(onkeypress) { | |
230 | - return function(event) { | |
229 | +document.onkeypress = function (onkeypress) { | |
230 | + return function (event) { | |
231 | 231 | if (!!onkeypress) { |
232 | 232 | onkeypress(event); |
233 | 233 | } |
@@ -238,8 +238,8 @@ | ||
238 | 238 | }(document.onkeypress); |
239 | 239 | |
240 | 240 | if (!Object.create) { |
241 | - Object.create = function(o) { | |
242 | - var func = function() { | |
241 | + Object.create = function (o) { | |
242 | + var func = function () { | |
243 | 243 | }; |
244 | 244 | func.prototype = o; |
245 | 245 | return new func(); |
@@ -247,7 +247,7 @@ | ||
247 | 247 | } |
248 | 248 | |
249 | 249 | if (!Math.sign) { |
250 | - Math.sign = function(num) { | |
250 | + Math.sign = function (num) { | |
251 | 251 | if (num > 0) { |
252 | 252 | return 1; |
253 | 253 | } else { |
@@ -261,7 +261,7 @@ | ||
261 | 261 | } |
262 | 262 | |
263 | 263 | if (!Math.dice) { |
264 | - Math.dice = function(fre, sides) { | |
264 | + Math.dice = function (fre, sides) { | |
265 | 265 | var val = 0; |
266 | 266 | for (var i = 0; i < fre; i++) { |
267 | 267 | val += Math.round(Math.random() * sides + 0.5); |
@@ -271,7 +271,7 @@ | ||
271 | 271 | } |
272 | 272 | |
273 | 273 | if (!Array.prototype.remove) { |
274 | - Array.prototype.remove = function(o) { | |
274 | + Array.prototype.remove = function (o) { | |
275 | 275 | var len = this.length; |
276 | 276 | var result = false; |
277 | 277 | for (var i = 0; i < len; i++) { |
@@ -292,13 +292,13 @@ | ||
292 | 292 | } |
293 | 293 | |
294 | 294 | if (!Array.prototype.getLast) { |
295 | - Array.prototype.getLast = function() { | |
295 | + Array.prototype.getLast = function () { | |
296 | 296 | return this[this.length - 1]; |
297 | 297 | }; |
298 | 298 | } |
299 | 299 | |
300 | 300 | if (!Array.prototype.indexOf) { |
301 | - Array.prototype.indexOf = function(elt /*, from*/) { | |
301 | + Array.prototype.indexOf = function (elt /*, from*/) { | |
302 | 302 | var len = this.length; |
303 | 303 | var from = Number(arguments[1]) || 0; |
304 | 304 | from = (from < 0) ? Math.ceil(from) : Math.floor(from); |
@@ -342,7 +342,7 @@ | ||
342 | 342 | return this.uniqNumber === obj.uniqNumber; |
343 | 343 | }; |
344 | 344 | |
345 | -THIEF.func.method.removeFromInventory = function(obj) { | |
345 | +THIEF.func.method.removeFromInventory = function (obj) { | |
346 | 346 | var objX = obj.x; |
347 | 347 | var objY = obj.y; |
348 | 348 | THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + obj.x + ', ' + obj.y + ']から除外...'); |
@@ -363,7 +363,7 @@ | ||
363 | 363 | } |
364 | 364 | THIEF.html.addDebugMessage('...' + obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + objX + ', ' + objY + ']から除外完了。'); |
365 | 365 | |
366 | - if (this.type === 'level' && obj.active) { | |
366 | + if (this.isLevel && obj.isActive) { | |
367 | 367 | THIEF.html.addDebugMessage('アクティブリストから除外'); |
368 | 368 | this[THIEF.PROP.actObjectList].remove(obj); |
369 | 369 | } |
@@ -371,7 +371,7 @@ | ||
371 | 371 | return true; |
372 | 372 | }; |
373 | 373 | |
374 | -THIEF.func.method.addToInventory = function(obj, x, y) { | |
374 | +THIEF.func.method.addToInventory = function (obj, x, y) { | |
375 | 375 | |
376 | 376 | var result = false; |
377 | 377 |
@@ -421,7 +421,7 @@ | ||
421 | 421 | this.inventory[i][j].push(obj); |
422 | 422 | THIEF.html.addDebugMessage('[' + i + ', ' + j + ']に' + obj.get(THIEF.PROP.alphabet) + 'として追加'); |
423 | 423 | |
424 | - if (this.type === 'level' && obj.active) { | |
424 | + if (this.isLevel && obj.isActive) { | |
425 | 425 | THIEF.html.addDebugMessage('アクティブリストに追加'); |
426 | 426 | this[THIEF.PROP.actObjectList].push(obj); |
427 | 427 | } |
@@ -448,13 +448,13 @@ | ||
448 | 448 | var y = Math.round(Math.random() * this.get(THIEF.PROP.inventoryHeight)); |
449 | 449 | point = this.getInventoryFreeSpace(obj, x, y); |
450 | 450 | |
451 | - if (typeof point !== 'undefined' && this.inventory[x][y].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
451 | + if (typeof point !== 'undefined' && this.inventory[x][y].getLast().isFloor) { | |
452 | 452 | //if (point.x === 'number' && typeof point.y === 'number') { |
453 | 453 | break; |
454 | 454 | } |
455 | 455 | } |
456 | 456 | // ランダムに見つからなければ、左上から順に検索 |
457 | - if (typeof point.x !== 'number' && typeof point.y !== 'number') { | |
457 | + if (typeof point !== 'undefined' && typeof point.x !== 'number' && typeof point.y !== 'number') { | |
458 | 458 | point = this.getInventoryFreeSpace(obj); |
459 | 459 | } |
460 | 460 |
@@ -461,7 +461,7 @@ | ||
461 | 461 | return point; |
462 | 462 | }; |
463 | 463 | |
464 | -THIEF.func.method.getInventoryFreeSpace = function(obj, _x, _y) { | |
464 | +THIEF.func.method.getInventoryFreeSpace = function (obj, _x, _y) { | |
465 | 465 | |
466 | 466 | var invCellSize = this.get(THIEF.PROP.inventoryCellSize) || 10; |
467 | 467 | var invWidth = this.get(THIEF.PROP.inventoryWidth) || 0; |
@@ -495,7 +495,7 @@ | ||
495 | 495 | if (this.inventory && this.inventory[targetX] && this.inventory[targetX][targetY]) { |
496 | 496 | if (this.inventory[targetX][targetY].length <= invDepth) { |
497 | 497 | var lastObj = this.inventory[targetX][targetY].getLast(); |
498 | - if (typeof lastObj === 'undefined' || lastObj.type !== THIEF.Data.Obj.$Wall.type && (obj.get(THIEF.PROP.stackable) || lastObj.get(THIEF.PROP.stackable)) /* || !lastObj.get(THIEF.PARAM.mergeable) */) { | |
498 | + if (typeof lastObj === 'undefined' || !lastObj.isWall && (obj.get(THIEF.PROP.stackable) || lastObj.get(THIEF.PROP.stackable)) /* || !lastObj.get(THIEF.PARAM.mergeable) */) { | |
499 | 499 | if (lastObj) { |
500 | 500 | THIEF.html.addDebugMessage('[' + targetX + ', ' + targetY + ']にある' + lastObj.get(THIEF.PROP.displayName) + 'には重ねられる。'); |
501 | 501 | } else { |
@@ -541,7 +541,7 @@ | ||
541 | 541 | return result; |
542 | 542 | }; |
543 | 543 | |
544 | -THIEF.func.method.attackedBy = function(obj) { | |
544 | +THIEF.func.method.attackedBy = function (obj) { | |
545 | 545 | |
546 | 546 | THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + ' による ' + this.get(THIEF.PROP.displayName) + ' への攻撃処理を開始...'); |
547 | 547 |
@@ -581,7 +581,7 @@ | ||
581 | 581 | THIEF.html.addDebugMessage('死亡処理を開始...'); |
582 | 582 | THIEF.html.addMessage(THIEF.util.getText(THIEF.Data.Text.killBy, this.get(THIEF.PROP.displayName), obj.get(THIEF.PROP.displayName))); |
583 | 583 | THIEF.global.actLV.removeFromInventory(this); |
584 | - this.action = function() { | |
584 | + this.action = function () { | |
585 | 585 | return true |
586 | 586 | }; |
587 | 587 | THIEF.html.addDebugMessage('...死亡処理を完了。') |
@@ -592,11 +592,11 @@ | ||
592 | 592 | return true; |
593 | 593 | }; |
594 | 594 | |
595 | -THIEF.func.method.getInventoryXyObjectList = function(x, y) { | |
595 | +THIEF.func.method.getInventoryXyObjectList = function (x, y) { | |
596 | 596 | return this.inventory[x][y]; |
597 | 597 | }; |
598 | 598 | |
599 | -THIEF.func.method.getInventoryXyLastObject = function(x, y) { | |
599 | +THIEF.func.method.getInventoryXyLastObject = function (x, y) { | |
600 | 600 | var obj; |
601 | 601 | |
602 | 602 | // 必ずしも inventory の配列を完全に持っているとは限らないので注意すること |
@@ -606,17 +606,17 @@ | ||
606 | 606 | return obj; |
607 | 607 | }; |
608 | 608 | |
609 | -THIEF.func.method.removeInventoryObject = function(o) { | |
609 | +THIEF.func.method.removeInventoryObject = function (o) { | |
610 | 610 | this.removeInventoryXyObject(o.x, o.y, o); |
611 | 611 | }; |
612 | 612 | |
613 | 613 | |
614 | -THIEF.func.method.removeInventoryXyObject = function(x, y, o) { | |
614 | +THIEF.func.method.removeInventoryXyObject = function (x, y, o) { | |
615 | 615 | this.inventory[x][y].remove(o); |
616 | 616 | }; |
617 | 617 | |
618 | 618 | // ループ処理を加えること |
619 | -THIEF.func.method.getInventoryAlphabets = function() { | |
619 | +THIEF.func.method.getInventoryAlphabets = function () { | |
620 | 620 | var alphabets = []; |
621 | 621 | if (this.inventory) { |
622 | 622 | for (var i = 0; i < this.get(THIEF.PROP.inventoryWidth); i++) { |
@@ -638,11 +638,11 @@ | ||
638 | 638 | return alphabets; |
639 | 639 | }; |
640 | 640 | |
641 | -THIEF.func.method.getInventoryNonExistAlphabet = function() { | |
641 | +THIEF.func.method.getInventoryNonExistAlphabet = function () { | |
642 | 642 | // 常にアルファベットの先頭が利用されないようにしている |
643 | 643 | var key = THIEF.KEY; |
644 | 644 | var index = key.a; |
645 | - return function() { | |
645 | + return function () { | |
646 | 646 | var alphabets = this.getInventoryAlphabets(); |
647 | 647 | |
648 | 648 | var counter = 0; |
@@ -670,7 +670,7 @@ | ||
670 | 670 | }(); |
671 | 671 | |
672 | 672 | // 配列を渡してカリー化(?) |
673 | -THIEF.func.method.selecter = function(objs, exec, immediately, abc) { | |
673 | +THIEF.func.method.selector = function (objs, exec, immediately, abc) { | |
674 | 674 | |
675 | 675 | var key = THIEF.KEY; |
676 | 676 | var selected = []; |
@@ -714,7 +714,7 @@ | ||
714 | 714 | } |
715 | 715 | |
716 | 716 | // 選択用関数返却 |
717 | - return function() { | |
717 | + return function () { | |
718 | 718 | var finish = false; |
719 | 719 | switch (THIEF.global.keycode) { |
720 | 720 |
@@ -787,7 +787,7 @@ | ||
787 | 787 | |
788 | 788 | }; |
789 | 789 | |
790 | -THIEF.func.method.cpu = function() { | |
790 | +THIEF.func.method.cpu = function () { | |
791 | 791 | |
792 | 792 | THIEF.html.addDebugMessage('CPU行動開始...'); |
793 | 793 |
@@ -818,7 +818,7 @@ | ||
818 | 818 | return true; |
819 | 819 | }; |
820 | 820 | |
821 | -THIEF.func.method.move = function(dx, dy) { | |
821 | +THIEF.func.method.move = function (dx, dy) { | |
822 | 822 | |
823 | 823 | var result; |
824 | 824 | THIEF.html.addDebugMessage('移動処理 move(' + dx + ', ' + dy + ') を開始...'); |
@@ -847,7 +847,7 @@ | ||
847 | 847 | result = true; |
848 | 848 | |
849 | 849 | } else { |
850 | - if (target.get(THIEF.PROP.active)) { | |
850 | + if (target.get(THIEF.PROP.isActive)) { | |
851 | 851 | THIEF.html.addDebugMessage('active なものが対象なので攻撃してみる。'); |
852 | 852 | target.attackedBy(this); |
853 | 853 | result = true; |
@@ -869,7 +869,7 @@ | ||
869 | 869 | return false; |
870 | 870 | }; |
871 | 871 | |
872 | -THIEF.func.method.getObjectList = function(compObj, recursive) { | |
872 | +THIEF.func.method.getObjectList = function (compObj, recursive) { | |
873 | 873 | |
874 | 874 | var list = []; |
875 | 875 | if (typeof this.inventory !== "undefined") { |
@@ -910,12 +910,12 @@ | ||
910 | 910 | return list; |
911 | 911 | }; |
912 | 912 | |
913 | -THIEF.func.method.execActiveObjects = function() { | |
913 | +THIEF.func.method.execActiveObjects = function () { | |
914 | 914 | var result = true; |
915 | 915 | |
916 | 916 | if (this[THIEF.PROP.actObjectList]) { |
917 | 917 | // アクティブリストを降順にソート |
918 | - this[THIEF.PROP.actObjectList].sort(function(a, b) { | |
918 | + this[THIEF.PROP.actObjectList].sort(function (a, b) { | |
919 | 919 | return b.ct - a.ct; |
920 | 920 | }); |
921 | 921 |
@@ -933,7 +933,7 @@ | ||
933 | 933 | } |
934 | 934 | |
935 | 935 | // アクティブリストを降順にソート |
936 | - this[THIEF.PROP.actObjectList].sort(function(a, b) { | |
936 | + this[THIEF.PROP.actObjectList].sort(function (a, b) { | |
937 | 937 | return b.ct - a.ct; |
938 | 938 | }); |
939 | 939 | } |
@@ -941,7 +941,7 @@ | ||
941 | 941 | return result; |
942 | 942 | }; |
943 | 943 | |
944 | -THIEF.func.method.action = function() { | |
944 | +THIEF.func.method.action = function () { | |
945 | 945 | |
946 | 946 | THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' の行動を開始...'); |
947 | 947 | var result; |
@@ -956,7 +956,7 @@ | ||
956 | 956 | return result; |
957 | 957 | }; |
958 | 958 | |
959 | -THIEF.func.method.decay = function() { | |
959 | +THIEF.func.method.decay = function () { | |
960 | 960 | |
961 | 961 | if (this.decayable) { |
962 | 962 | this.dp--; |
@@ -969,7 +969,7 @@ | ||
969 | 969 | return true; |
970 | 970 | }; |
971 | 971 | |
972 | -THIEF.func.method.manual = function() { | |
972 | +THIEF.func.method.manual = function () { | |
973 | 973 | |
974 | 974 | var finish; |
975 | 975 | var code = THIEF.global.keycode; |
@@ -1017,7 +1017,7 @@ | ||
1017 | 1017 | return obj; |
1018 | 1018 | }; |
1019 | 1019 | |
1020 | -THIEF.func.method.goTheStairs = function(trueIsUpFalseIsDown) { | |
1020 | +THIEF.func.method.goTheStairs = function (trueIsUpFalseIsDown) { | |
1021 | 1021 | var floor = THIEF.global.actLV.getInventoryXyObjectList(this.x, this.y); |
1022 | 1022 | var stairs; |
1023 | 1023 | var flag = false; |
@@ -1099,49 +1099,49 @@ | ||
1099 | 1099 | }; |
1100 | 1100 | |
1101 | 1101 | THIEF.func.command = {}; // マニュアルコマンドで実行して良いもの |
1102 | -THIEF.func.command.goUp = function() { | |
1102 | +THIEF.func.command.goUp = function () { | |
1103 | 1103 | return this.move(0, -1); |
1104 | 1104 | }; |
1105 | 1105 | |
1106 | -THIEF.func.command.goDown = function() { | |
1106 | +THIEF.func.command.goDown = function () { | |
1107 | 1107 | return this.move(0, 1); |
1108 | 1108 | }; |
1109 | 1109 | |
1110 | -THIEF.func.command.goLeft = function() { | |
1110 | +THIEF.func.command.goLeft = function () { | |
1111 | 1111 | return this.move(-1, 0); |
1112 | 1112 | }; |
1113 | 1113 | |
1114 | -THIEF.func.command.goRight = function() { | |
1114 | +THIEF.func.command.goRight = function () { | |
1115 | 1115 | return this.move(1, 0); |
1116 | 1116 | }; |
1117 | 1117 | |
1118 | -THIEF.func.command.goUpperLeft = function() { | |
1118 | +THIEF.func.command.goUpperLeft = function () { | |
1119 | 1119 | return this.move(-1, -1); |
1120 | 1120 | }; |
1121 | 1121 | |
1122 | -THIEF.func.command.goUpperRight = function() { | |
1122 | +THIEF.func.command.goUpperRight = function () { | |
1123 | 1123 | return this.move(1, -1); |
1124 | 1124 | }; |
1125 | 1125 | |
1126 | -THIEF.func.command.goLowerLeft = function() { | |
1126 | +THIEF.func.command.goLowerLeft = function () { | |
1127 | 1127 | return this.move(-1, 1); |
1128 | 1128 | }; |
1129 | 1129 | |
1130 | -THIEF.func.command.goLowerRight = function() { | |
1130 | +THIEF.func.command.goLowerRight = function () { | |
1131 | 1131 | return this.move(1, 1); |
1132 | 1132 | }; |
1133 | 1133 | |
1134 | -THIEF.func.command.refreshHTML = function() { | |
1134 | +THIEF.func.command.refreshHTML = function () { | |
1135 | 1135 | THIEF.html.refresh(); |
1136 | 1136 | return false; |
1137 | 1137 | }; |
1138 | 1138 | |
1139 | -THIEF.func.command.rest = function() { | |
1139 | +THIEF.func.command.rest = function () { | |
1140 | 1140 | this.ct = 99; |
1141 | 1141 | return true; |
1142 | 1142 | }; |
1143 | 1143 | |
1144 | -THIEF.func.command.pickup = function() { | |
1144 | +THIEF.func.command.pickup = function () { | |
1145 | 1145 | var tmp = THIEF.global.actLV.getInventoryXyObjectList(this.x, this.y); |
1146 | 1146 | var finish = true; |
1147 | 1147 | var objs = []; |
@@ -1155,7 +1155,7 @@ | ||
1155 | 1155 | if (objs.length > 0) { |
1156 | 1156 | var from = THIEF.global.actLV; |
1157 | 1157 | var to = this; |
1158 | - var exec = function(selected) { | |
1158 | + var exec = function (selected) { | |
1159 | 1159 | var result = false; |
1160 | 1160 | |
1161 | 1161 | for (var i = 0; i < selected.length; i++) { |
@@ -1176,7 +1176,7 @@ | ||
1176 | 1176 | }; |
1177 | 1177 | |
1178 | 1178 | THIEF.html.addMessage(THIEF.util.getText(THIEF.Data.Text.pickupWhich)); |
1179 | - this.action = THIEF.func.method.selecter(objs, exec, false, true); | |
1179 | + this.action = THIEF.func.method.selector(objs, exec, false, true); | |
1180 | 1180 | finish = false; |
1181 | 1181 | } else { |
1182 | 1182 | THIEF.html.addMessage(THIEF.util.getText(THIEF.Data.Text.noItemHere)); |
@@ -1184,7 +1184,7 @@ | ||
1184 | 1184 | return finish; |
1185 | 1185 | }; |
1186 | 1186 | |
1187 | -THIEF.func.command.drop = function() { | |
1187 | +THIEF.func.command.drop = function () { | |
1188 | 1188 | |
1189 | 1189 | // とりあえず一次元配列化 |
1190 | 1190 | var list = []; |
@@ -1213,7 +1213,7 @@ | ||
1213 | 1213 | if (list.length > 0) { |
1214 | 1214 | var from = this; |
1215 | 1215 | var to = THIEF.global.actLV; |
1216 | - var exec = function(selected) { | |
1216 | + var exec = function (selected) { | |
1217 | 1217 | var act = false; |
1218 | 1218 | if (selected.length > 0) { |
1219 | 1219 | act = true; |
@@ -1247,7 +1247,7 @@ | ||
1247 | 1247 | return act; |
1248 | 1248 | }; |
1249 | 1249 | |
1250 | - this.action = THIEF.func.method.selecter(list, exec, false, false); | |
1250 | + this.action = THIEF.func.method.selector(list, exec, false, false); | |
1251 | 1251 | //result = this.action(); |
1252 | 1252 | //result = false; |
1253 | 1253 | } else { |
@@ -1257,7 +1257,7 @@ | ||
1257 | 1257 | return false; |
1258 | 1258 | }; |
1259 | 1259 | |
1260 | -THIEF.func.command.showInventory = function() { | |
1260 | +THIEF.func.command.showInventory = function () { | |
1261 | 1261 | |
1262 | 1262 | THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + 'のインベントリ表示を開始...'); |
1263 | 1263 |
@@ -1287,7 +1287,7 @@ | ||
1287 | 1287 | if (list.length === 0) { |
1288 | 1288 | THIEF.html.addMessage(THIEF.util.getText(THIEF.Data.Text.inventoryIsEmpty)); |
1289 | 1289 | } else { |
1290 | - this.action = THIEF.func.method.selecter(list, THIEF.func.method.inputWait, true, false); | |
1290 | + this.action = THIEF.func.method.selector(list, THIEF.func.method.inputWait, true, false); | |
1291 | 1291 | } |
1292 | 1292 | |
1293 | 1293 | THIEF.html.addDebugMessage('...' + this.get(THIEF.PROP.displayName) + 'のインベントリ表示を完了。'); |
@@ -1295,7 +1295,7 @@ | ||
1295 | 1295 | return false; |
1296 | 1296 | }; |
1297 | 1297 | |
1298 | -THIEF.func.command.printHistory = function() { | |
1298 | +THIEF.func.command.printHistory = function () { | |
1299 | 1299 | |
1300 | 1300 | var key = THIEF.KEY; |
1301 | 1301 |
@@ -1310,7 +1310,7 @@ | ||
1310 | 1310 | |
1311 | 1311 | THIEF.html.addInfomation('<div style="text-align:center;">--Now--</div>'); |
1312 | 1312 | |
1313 | - this.action = function() { | |
1313 | + this.action = function () { | |
1314 | 1314 | var finish = false; |
1315 | 1315 | switch (THIEF.global.keycode) { |
1316 | 1316 |
@@ -1373,7 +1373,7 @@ | ||
1373 | 1373 | return false; |
1374 | 1374 | }; |
1375 | 1375 | |
1376 | -THIEF.func.command.extendedCommand = function() { | |
1376 | +THIEF.func.command.extendedCommand = function () { | |
1377 | 1377 | |
1378 | 1378 | THIEF.html.setInput('#'); |
1379 | 1379 |
@@ -1393,7 +1393,7 @@ | ||
1393 | 1393 | var line = ''; |
1394 | 1394 | var target = ''; |
1395 | 1395 | |
1396 | - this.action = function() { | |
1396 | + this.action = function () { | |
1397 | 1397 | var finish = false; |
1398 | 1398 | var update = false; |
1399 | 1399 | if ((THIEF.KEY.a <= THIEF.global.keycode && THIEF.global.keycode <= THIEF.KEY.z) || (THIEF.KEY.A <= THIEF.global.keycode && THIEF.global.keycode <= THIEF.KEY.Z)) { |
@@ -1472,7 +1472,7 @@ | ||
1472 | 1472 | var my = this; |
1473 | 1473 | // メソッド書き換え |
1474 | 1474 | if (list.length > 0) { |
1475 | - var exec = function(selected) { | |
1475 | + var exec = function (selected) { | |
1476 | 1476 | var act = false; |
1477 | 1477 | if (selected.length > 0) { |
1478 | 1478 | act = true; |
@@ -1505,7 +1505,7 @@ | ||
1505 | 1505 | return act; |
1506 | 1506 | }; |
1507 | 1507 | |
1508 | - this.action = THIEF.func.method.selecter(list, exec, true, false); | |
1508 | + this.action = THIEF.func.method.selector(list, exec, true, false); | |
1509 | 1509 | } else { |
1510 | 1510 | THIEF.html.addMessage(THIEF.util.getText(THIEF.Data.Text.inventoryIsEmpty)); |
1511 | 1511 | } |
@@ -1513,17 +1513,17 @@ | ||
1513 | 1513 | return false; |
1514 | 1514 | }; |
1515 | 1515 | |
1516 | -THIEF.func.command.goUpTheStairs = function() { | |
1516 | +THIEF.func.command.goUpTheStairs = function () { | |
1517 | 1517 | return THIEF.func.method.goTheStairs.call(this, true); |
1518 | 1518 | }; |
1519 | 1519 | |
1520 | -THIEF.func.command.goDownTheStairs = function() { | |
1520 | +THIEF.func.command.goDownTheStairs = function () { | |
1521 | 1521 | return THIEF.func.method.goTheStairs.call(this, false); |
1522 | 1522 | }; |
1523 | 1523 | |
1524 | 1524 | THIEF.util = {}; |
1525 | 1525 | |
1526 | -THIEF.util.init = function() { | |
1526 | +THIEF.util.init = function () { | |
1527 | 1527 | |
1528 | 1528 | THIEF.html.addDebugMessage('<em>初期化(ターン0)を開始</em>...'); |
1529 | 1529 |
@@ -1552,7 +1552,7 @@ | ||
1552 | 1552 | }; |
1553 | 1553 | |
1554 | 1554 | |
1555 | -THIEF.util.test = function() { | |
1555 | +THIEF.util.test = function () { | |
1556 | 1556 | |
1557 | 1557 | THIEF.global.adventurer = THIEF.util.factory(THIEF.Data.Obj.Human); |
1558 | 1558 | THIEF.global.adventurer.color = 'red'; |
@@ -1662,7 +1662,7 @@ | ||
1662 | 1662 | }; |
1663 | 1663 | |
1664 | 1664 | |
1665 | -THIEF.util.getKeyCode = function(e) { | |
1665 | +THIEF.util.getKeyCode = function (e) { | |
1666 | 1666 | |
1667 | 1667 | // Browser bug fix |
1668 | 1668 | if (!e) { |
@@ -1679,7 +1679,7 @@ | ||
1679 | 1679 | } else if (document.getElementById) { |
1680 | 1680 | code = parseInt((parseInt(e.keyCode) === 0) ? e.charCode : e.keyCode); |
1681 | 1681 | } else { // document.layers |
1682 | - code = parseInt(e.which); | |
1682 | + code = parseInt(e.which.toString()); | |
1683 | 1683 | } |
1684 | 1684 | |
1685 | 1685 |
@@ -1759,12 +1759,12 @@ | ||
1759 | 1759 | |
1760 | 1760 | }; |
1761 | 1761 | |
1762 | -THIEF.util.factory = function() { | |
1762 | +THIEF.util.factory = function () { | |
1763 | 1763 | |
1764 | 1764 | var tree = []; |
1765 | 1765 | var id = 0; |
1766 | 1766 | |
1767 | - return function(obj) { | |
1767 | + return function (obj) { | |
1768 | 1768 | |
1769 | 1769 | //THIEF.html.addDebugMessage('オブジェクトの生成処理を開始...'); |
1770 | 1770 | //THIEF.html.addDebugMessage('マスターの有無を確認...'); |
@@ -1981,7 +1981,7 @@ | ||
1981 | 1981 | THIEF.html.addDebugMessage('...ダンジョンの作成を完了'); |
1982 | 1982 | }; |
1983 | 1983 | |
1984 | -THIEF.util.createLevel = function(dun, lvNum) { | |
1984 | +THIEF.util.createLevel = function (dun, lvNum) { | |
1985 | 1985 | if (dun[lvNum] && dun[lvNum].created) { |
1986 | 1986 | THIEF.html.addDebugMessage(THIEF.func.method.get.call(dun, THIEF.PROP.name) + 'の第 ' + lvNum + ' レベルは既に作成済み'); |
1987 | 1987 | return; |
@@ -2114,7 +2114,7 @@ | ||
2114 | 2114 | level.safety = template.safety; |
2115 | 2115 | } |
2116 | 2116 | |
2117 | - level.type = 'level'; | |
2117 | + level.isLevel = true; | |
2118 | 2118 | level.created = true; |
2119 | 2119 | dun[lvNum] = level; |
2120 | 2120 |
@@ -2121,7 +2121,7 @@ | ||
2121 | 2121 | THIEF.html.addDebugMessage('...レベルの作成を完了'); |
2122 | 2122 | }; |
2123 | 2123 | |
2124 | -THIEF.util.createMap = function(width, height) { | |
2124 | +THIEF.util.createMap = function (width, height) { | |
2125 | 2125 | |
2126 | 2126 | var i, j; |
2127 | 2127 | var map = []; |
@@ -2143,7 +2143,7 @@ | ||
2143 | 2143 | var maxRooms = Math.floor(Math.random() * (width + height) / 10) + (width + height) / 20; |
2144 | 2144 | var anchors = []; // 部屋の起点(一番左上=若い座標) |
2145 | 2145 | var spaceEdges = [ |
2146 | - {x:1, y:1} | |
2146 | + {x : 1, y : 1} | |
2147 | 2147 | ]; // 左上は常にスペースの角のため |
2148 | 2148 | var roonCount = 0; |
2149 | 2149 | var roop = 0; |
@@ -2220,7 +2220,7 @@ | ||
2220 | 2220 | // 壁までの距離が短い方に伸ばすように分割線を引く |
2221 | 2221 | // 長い方に伸ばすように引くと部屋が小さくなるため |
2222 | 2222 | map[ax][ay].push(THIEF.util.factory(THIEF.Data.Obj.DarkFloor)); |
2223 | - anchors.push({x:ax, y:ay}); | |
2223 | + anchors.push({x : ax, y : ay}); | |
2224 | 2224 | |
2225 | 2225 | if (my < mx) { |
2226 | 2226 | // 縦に引く |
@@ -2229,7 +2229,7 @@ | ||
2229 | 2229 | map[ax][i].push(THIEF.util.factory(THIEF.Data.Obj.DarkFloor)); |
2230 | 2230 | } else { |
2231 | 2231 | // 上端に付いた場合には、その一つ右は必ず領域の一番左上になる |
2232 | - spaceEdges.push({x:ax + 1, y:i + 1}); | |
2232 | + spaceEdges.push({x : ax + 1, y : i + 1}); | |
2233 | 2233 | break; |
2234 | 2234 | } |
2235 | 2235 | } |
@@ -2247,7 +2247,7 @@ | ||
2247 | 2247 | map[i][ay].push(THIEF.util.factory(THIEF.Data.Obj.DarkFloor)); |
2248 | 2248 | } else { |
2249 | 2249 | // 左端に付いた場合には、その一つ下は必ず領域の一番左上になる |
2250 | - spaceEdges.push({x:i + 1, y:ay + 1}); | |
2250 | + spaceEdges.push({x : i + 1, y : ay + 1}); | |
2251 | 2251 | break; |
2252 | 2252 | } |
2253 | 2253 | } |
@@ -2306,7 +2306,7 @@ | ||
2306 | 2306 | endY++; |
2307 | 2307 | } |
2308 | 2308 | |
2309 | - roomsInfo.push({x:x + startX, y:y + startY, width:endX - startX, height:endY - startY}); | |
2309 | + roomsInfo.push({x : x + startX, y : y + startY, width : endX - startX, height : endY - startY}); | |
2310 | 2310 | |
2311 | 2311 | // 部屋作成 |
2312 | 2312 | for (i = startX; i < endX; i++) { |
@@ -2396,53 +2396,53 @@ | ||
2396 | 2396 | |
2397 | 2397 | // 不要な通路を削除 |
2398 | 2398 | |
2399 | - var clearFloor = function(_x, _y) { | |
2399 | + var clearFloor = function (_x, _y) { | |
2400 | 2400 | var around; |
2401 | 2401 | var x = _x; |
2402 | 2402 | var y = _y; |
2403 | 2403 | var nextX, nextY; |
2404 | 2404 | var flr = map[x][y].getLast(); |
2405 | - if (typeof flr !== 'undefined' && flr.type === THIEF.Data.Obj.$Floor.type) { | |
2405 | + if (typeof flr !== 'undefined' && flr.isFloor) { | |
2406 | 2406 | while (true) { |
2407 | 2407 | // 周囲に通路が一つだけか調べる |
2408 | 2408 | around = 0; |
2409 | - if (typeof map[x - 1][y - 1].getLast() !== 'undefined' && map[x - 1][y - 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2409 | + if (typeof map[x - 1][y - 1].getLast() !== 'undefined' && map[x - 1][y - 1].getLast().isFloor) { | |
2410 | 2410 | around++; |
2411 | 2411 | nextX = x - 1; |
2412 | 2412 | nextY = y - 1; |
2413 | 2413 | } |
2414 | - if (typeof map[x][y - 1].getLast() !== 'undefined' && map[x][y - 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2414 | + if (typeof map[x][y - 1].getLast() !== 'undefined' && map[x][y - 1].getLast().isFloor) { | |
2415 | 2415 | around++; |
2416 | 2416 | nextX = x; |
2417 | 2417 | nextY = y - 1; |
2418 | 2418 | } |
2419 | - if (typeof map[x + 1][y - 1].getLast() !== 'undefined' && map[x + 1][y - 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2419 | + if (typeof map[x + 1][y - 1].getLast() !== 'undefined' && map[x + 1][y - 1].getLast().isFloor) { | |
2420 | 2420 | around++; |
2421 | 2421 | nextX = x + 1; |
2422 | 2422 | nextY = y - 1; |
2423 | 2423 | } |
2424 | - if (typeof map[x - 1][y].getLast() !== 'undefined' && map[x - 1][y].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2424 | + if (typeof map[x - 1][y].getLast() !== 'undefined' && map[x - 1][y].getLast().isFloor) { | |
2425 | 2425 | around++; |
2426 | 2426 | nextX = x - 1; |
2427 | 2427 | nextY = y; |
2428 | 2428 | } |
2429 | 2429 | // me |
2430 | - if (typeof map[x + 1][y].getLast() !== 'undefined' && map[x + 1][y].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2430 | + if (typeof map[x + 1][y].getLast() !== 'undefined' && map[x + 1][y].getLast().isFloor) { | |
2431 | 2431 | around++; |
2432 | 2432 | nextX = x + 1; |
2433 | 2433 | nextY = y; |
2434 | 2434 | } |
2435 | - if (typeof map[x - 1][y + 1].getLast() !== 'undefined' && map[x - 1][y + 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2435 | + if (typeof map[x - 1][y + 1].getLast() !== 'undefined' && map[x - 1][y + 1].getLast().isFloor) { | |
2436 | 2436 | around++; |
2437 | 2437 | nextX = x - 1; |
2438 | 2438 | nextY = y + 1; |
2439 | 2439 | } |
2440 | - if (typeof map[x][y + 1].getLast() !== 'undefined' && map[x][y + 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2440 | + if (typeof map[x][y + 1].getLast() !== 'undefined' && map[x][y + 1].getLast().isFloor) { | |
2441 | 2441 | around++; |
2442 | 2442 | nextX = x; |
2443 | 2443 | nextY = y + 1; |
2444 | 2444 | } |
2445 | - if (typeof map[x + 1][y + 1].getLast() !== 'undefined' && map[x + 1][y + 1].getLast().type === THIEF.Data.Obj.$Floor.type) { | |
2445 | + if (typeof map[x + 1][y + 1].getLast() !== 'undefined' && map[x + 1][y + 1].getLast().isFloor) { | |
2446 | 2446 | around++; |
2447 | 2447 | nextX = x + 1; |
2448 | 2448 | nextY = y + 1; |
@@ -2482,7 +2482,7 @@ | ||
2482 | 2482 | return map; |
2483 | 2483 | }; |
2484 | 2484 | |
2485 | -THIEF.util.mapParser = function(fmt) { | |
2485 | +THIEF.util.mapParser = function (fmt) { | |
2486 | 2486 | var width = fmt[0].length; |
2487 | 2487 | var height = fmt.length; |
2488 | 2488 | var map = []; |
@@ -2746,7 +2746,7 @@ | ||
2746 | 2746 | return revP[0]; |
2747 | 2747 | }; |
2748 | 2748 | |
2749 | -THIEF.util.getText = function() { | |
2749 | +THIEF.util.getText = function () { | |
2750 | 2750 | var text; |
2751 | 2751 | var i, j; |
2752 | 2752 |
@@ -2856,7 +2856,7 @@ | ||
2856 | 2856 | |
2857 | 2857 | THIEF.html = {}; |
2858 | 2858 | |
2859 | -THIEF.html.setXy = function(x, y, text) { | |
2859 | +THIEF.html.setXy = function (x, y, text) { | |
2860 | 2860 | if (0 <= x && x < THIEF.conf.mapWidth && 0 <= y && y < THIEF.conf.mapHeight) { |
2861 | 2861 | document.getElementById(THIEF.conf.id + x + '_' + y).innerHTML = text; |
2862 | 2862 | } |
@@ -2863,7 +2863,7 @@ | ||
2863 | 2863 | }; |
2864 | 2864 | |
2865 | 2865 | |
2866 | -THIEF.html.refreshXy = function(x, y) { | |
2866 | +THIEF.html.refreshXy = function (x, y) { | |
2867 | 2867 | if (THIEF.global.actLV.inventory[x] && THIEF.global.actLV.inventory[x][y]) { |
2868 | 2868 | var obj = THIEF.global.actLV.inventory[x][y].getLast(); |
2869 | 2869 | if (obj.color) { |
@@ -2876,7 +2876,7 @@ | ||
2876 | 2876 | } |
2877 | 2877 | }; |
2878 | 2878 | |
2879 | -THIEF.html.refresh = function() { | |
2879 | +THIEF.html.refresh = function () { | |
2880 | 2880 | THIEF.html.addDebugMessage('再描画を開始...'); |
2881 | 2881 | for (var i = 0; i < THIEF.conf.mapWidth; i++) { |
2882 | 2882 | for (var j = 0; j < THIEF.conf.mapHeight; j++) { |
@@ -2886,15 +2886,15 @@ | ||
2886 | 2886 | THIEF.html.addDebugMessage('...再描画を完了。'); |
2887 | 2887 | }; |
2888 | 2888 | |
2889 | -THIEF.html.setInput = function(text) { | |
2889 | +THIEF.html.setInput = function (text) { | |
2890 | 2890 | document.getElementById(THIEF.conf.id + 'Input').innerHTML = text; |
2891 | 2891 | }; |
2892 | 2892 | |
2893 | -THIEF.html.addInput = function(text) { | |
2893 | +THIEF.html.addInput = function (text) { | |
2894 | 2894 | document.getElementById(THIEF.conf.id + 'Input').innerHTML += text; |
2895 | 2895 | }; |
2896 | 2896 | |
2897 | -THIEF.html.addMessage = function(text) { | |
2897 | +THIEF.html.addMessage = function (text) { | |
2898 | 2898 | |
2899 | 2899 | if (text) { |
2900 | 2900 | var log = {}; |
@@ -2919,27 +2919,27 @@ | ||
2919 | 2919 | document.getElementById(THIEF.conf.id + 'Message' + (THIEF.conf.messageLines - 1)).innerHTML = text || ' '; |
2920 | 2920 | }; |
2921 | 2921 | |
2922 | -THIEF.html.clearMessage = function() { | |
2922 | +THIEF.html.clearMessage = function () { | |
2923 | 2923 | for (var i = 0; i < THIEF.conf.messageLines; i++) { |
2924 | 2924 | document.getElementById(THIEF.conf.id + 'Message' + i).innerHTML = ' '; |
2925 | 2925 | } |
2926 | 2926 | }; |
2927 | 2927 | |
2928 | -THIEF.html.clearInfomation = function() { | |
2928 | +THIEF.html.clearInfomation = function () { | |
2929 | 2929 | document.getElementById(THIEF.conf.id + 'Infomation').innerHTML = ''; |
2930 | 2930 | }; |
2931 | 2931 | |
2932 | -THIEF.html.addInfomation = function(text) { | |
2932 | +THIEF.html.addInfomation = function (text) { | |
2933 | 2933 | document.getElementById(THIEF.conf.id + 'Infomation').innerHTML += '<p>' + text + '</p>\n'; |
2934 | 2934 | }; |
2935 | 2935 | |
2936 | 2936 | //noinspection JSUnusedGlobalSymbols |
2937 | -THIEF.html.addDebugMessage = function() { | |
2937 | +THIEF.html.addDebugMessage = function () { | |
2938 | 2938 | |
2939 | 2939 | var indent = ''; |
2940 | 2940 | var hist = []; |
2941 | 2941 | |
2942 | - return function(text) { | |
2942 | + return function (text) { | |
2943 | 2943 | |
2944 | 2944 | if (THIEF.conf.debugmode) { |
2945 | 2945 | if (typeof text === 'string') { |
@@ -2991,7 +2991,7 @@ | ||
2991 | 2991 | }; |
2992 | 2992 | */ |
2993 | 2993 | |
2994 | -THIEF.html.showCommandHelp = function() { | |
2994 | +THIEF.html.showCommandHelp = function () { | |
2995 | 2995 | var help = ''; |
2996 | 2996 | help += '<table border=1>\n'; |
2997 | 2997 | help += '<tr><th colspan=3>Command Help</th></tr>\n'; |
@@ -3001,7 +3001,7 @@ | ||
3001 | 3001 | com.push(name); |
3002 | 3002 | } |
3003 | 3003 | } |
3004 | - com.sort(function(a, b) { | |
3004 | + com.sort(function (a, b) { | |
3005 | 3005 | var x = THIEF.Data.Keymap[a].key; |
3006 | 3006 | var y = THIEF.Data.Keymap[b].key; |
3007 | 3007 |
@@ -3036,7 +3036,7 @@ | ||
3036 | 3036 | document.getElementById(THIEF.conf.id + 'Footer').innerHTML = help; |
3037 | 3037 | }; |
3038 | 3038 | |
3039 | -THIEF.html.init = function() { | |
3039 | +THIEF.html.init = function () { | |
3040 | 3040 | |
3041 | 3041 | var line = ''; |
3042 | 3042 | var i, j; |
@@ -3047,11 +3047,11 @@ | ||
3047 | 3047 | document.getElementsByTagName('head')[0].appendChild(style); |
3048 | 3048 | var sheet = document.styleSheets[0]; |
3049 | 3049 | if (sheet.insertRule) { |
3050 | - sheet.addStyle = function(selector, property, value) { | |
3050 | + sheet.addStyle = function (selector, property, value) { | |
3051 | 3051 | sheet.insertRule(selector + '{' + property + ':' + value + ';}', sheet.cssRules.length); |
3052 | 3052 | }; |
3053 | 3053 | } else { |
3054 | - sheet.addStyle = function(selector, property, value) { | |
3054 | + sheet.addStyle = function (selector, property, value) { | |
3055 | 3055 | sheet.addRule(selector, property + ':' + value); |
3056 | 3056 | }; |
3057 | 3057 |
@@ -3367,7 +3367,7 @@ | ||
3367 | 3367 | ja : 'アイテムを置く', |
3368 | 3368 | en : 'drop your items.' |
3369 | 3369 | }, |
3370 | - cmdExecuteCommandDesc : { | |
3370 | + cmdExecuteCommandDesc : { | |
3371 | 3371 | ja : '指定したコマンドを実行します', |
3372 | 3372 | en : 'execute command' |
3373 | 3373 | }, |
@@ -3482,7 +3482,7 @@ | ||
3482 | 3482 | }; |
3483 | 3483 | |
3484 | 3484 | THIEF.Data.Prop = { // 特殊変数登録用 |
3485 | - displayName : function() { | |
3485 | + displayName : function () { | |
3486 | 3486 | var text = ''; |
3487 | 3487 | if (this.equiped) { |
3488 | 3488 | text += '[E] ' |
@@ -3576,16 +3576,15 @@ | ||
3576 | 3576 | THIEF.Data.Obj.$ = { // Default |
3577 | 3577 | name : THIEF.Data.Text.objDefaultName, |
3578 | 3578 | symbol : '╳', // 未登録用印(X に近い) |
3579 | - symbolName : THIEF.Data.Text.objDefaultSymbolName, | |
3580 | - type : 'unknown' | |
3579 | + symbolName : THIEF.Data.Text.objDefaultSymbolName | |
3581 | 3580 | }; |
3582 | 3581 | |
3583 | 3582 | |
3584 | 3583 | THIEF.Data.Obj.$Monster = { |
3585 | - active : true, | |
3584 | + isActive : true, | |
3586 | 3585 | ct : 0, |
3587 | 3586 | maxct : 100, |
3588 | - type : 'monster' | |
3587 | + isMonster : true | |
3589 | 3588 | }; |
3590 | 3589 | |
3591 | 3590 | THIEF.Data.Obj.$Item = { |
@@ -3592,10 +3591,9 @@ | ||
3592 | 3591 | stackable : true, |
3593 | 3592 | mergeable : true, |
3594 | 3593 | portable : true, |
3595 | - isItem : true, | |
3596 | 3594 | slot : 'Hand', // すべてのアイテムは手に持てる。 |
3597 | 3595 | slotName : THIEF.Data.Text.slotNameOfHand, |
3598 | - type : 'item' | |
3596 | + isItem : true | |
3599 | 3597 | }; |
3600 | 3598 | |
3601 | 3599 | THIEF.Data.Obj.$Armor = { |
@@ -3606,8 +3604,8 @@ | ||
3606 | 3604 | }; |
3607 | 3605 | |
3608 | 3606 | THIEF.Data.Obj.$Level = { |
3609 | - active : false, | |
3610 | - type : 'level' | |
3607 | + isActive : false, | |
3608 | + isLevel : true | |
3611 | 3609 | }; |
3612 | 3610 | |
3613 | 3611 | THIEF.Data.Obj.$Humanoid = { |
@@ -3650,7 +3648,7 @@ | ||
3650 | 3648 | |
3651 | 3649 | THIEF.Data.Obj.$Floor = { |
3652 | 3650 | stackable : true, |
3653 | - type : 'floor' | |
3651 | + isFloor : true | |
3654 | 3652 | // diggable : true |
3655 | 3653 | }; |
3656 | 3654 |
@@ -3680,7 +3678,7 @@ | ||
3680 | 3678 | |
3681 | 3679 | THIEF.Data.Obj.$Wall = { |
3682 | 3680 | symbol : '▓', // 濃いドット模様 |
3683 | - type : 'wall' | |
3681 | + isWall : true | |
3684 | 3682 | //diggable : true |
3685 | 3683 | }; |
3686 | 3684 |