• R/O
  • SSH
  • HTTPS

thief: Commit


Commit MetaInfo

Revision24 (tree)
Time2011-11-13 03:12:39
Authorseussnu

Log Message

0.0.7-alpha3
・ 変数名を修正

Change Summary

Incremental Difference

--- thief.js (revision 23)
+++ thief.js (revision 24)
@@ -45,8 +45,20 @@
4545 languagePriolity : ['en', 'ja'],
4646 statusPosition : 'bottom', // top or bottom
4747 statusLineFormat : [
48- '${THIEF.global.adventurer.%get@name%} ♥:${THIEF.global.adventurer.%get@hp%} STR:${THIEF.global.adventurer.%get@str%} CON:${THIEF.global.adventurer.%get@con%} DEX:${THIEF.global.adventurer.%get@dex%} INT:${THIEF.global.adventurer.%get@int%} POW:${THIEF.global.adventurer.%get@pow%} EDU:${THIEF.global.adventurer.%get@edu%} APP:${THIEF.global.adventurer.%get@app%} SAN:${THIEF.global.adventurer.%get@san%} AC:${THIEF.global.adventurer.%get@armorPoint%}',
49- 'Lang:${THIEF.conf.language} Turn:${THIEF.global.turn} CT:${THIEF.global.adventurer.%get@ct%}'
48+ '${THIEF.global.adventurer.%get@name%}' +
49+ ' ♥:${THIEF.global.adventurer.%get@hp%}' +
50+ ' STR:${THIEF.global.adventurer.%get@str%}' +
51+ ' CON:${THIEF.global.adventurer.%get@con%}' +
52+ ' DEX:${THIEF.global.adventurer.%get@dex%}' +
53+ ' INT:${THIEF.global.adventurer.%get@int%}' +
54+ ' POW:${THIEF.global.adventurer.%get@pow%}' +
55+ ' EDU:${THIEF.global.adventurer.%get@edu%}' +
56+ ' APP:${THIEF.global.adventurer.%get@app%}' +
57+ ' SAN:${THIEF.global.adventurer.%get@san%}' +
58+ ' AC:${THIEF.global.adventurer.%get@armorPoint%}',
59+ 'Lang:${THIEF.conf.language}' +
60+ ' Turn:${THIEF.global.turn}' +
61+ ' CT:${THIEF.global.adventurer.%get@ct%}'
5062 ],
5163 messagePosition : 'top', // top or bottom
5264 messageLines : 3,
@@ -55,7 +67,7 @@
5567 mainWindowPosition : 'left', // css float option (left, right, none)
5668 msgOverflow : 'hidden', // css overflow option (visible, scroll, hidden, auto)
5769 itemSort : ['$', '"', ']', '[', '%', '!', '?', '+', '=', '/', '(', ')', '*' ],
58- debugmode : false
70+ debugmode : true
5971 },
6072
6173 global : {
@@ -165,7 +177,7 @@
165177 F12 : 123 // { = "Shift + ["
166178 },
167179
168- PARAM : {
180+ PROP : {
169181 siz : 'siz',
170182 shapeWidth : 'shapeWidth',
171183 shapeHeight : 'shapeHeight',
@@ -353,6 +365,13 @@
353365 THIEF.func.method = {};
354366 THIEF.func.method.get = function (param) {
355367 var val;
368+
369+ if(THIEF.global.debugmode){
370+ if(typeof param === 'undefined'){
371+ alert('引数が師弟されていません');
372+ }
373+ }
374+
356375 if (typeof this[param] === 'function') {
357376 val = this[param]();
358377 } else if (this[param]) {
@@ -378,9 +397,9 @@
378397 THIEF.func.method.removeFromInventory = function(obj) {
379398 var objX = obj.x;
380399 var objY = obj.y;
381- THIEF.html.addDebugMessage(obj.get(THIEF.PARAM.displayName) + 'を' + this.get(THIEF.PARAM.displayName) + 'のインベントリ座標[' + obj.x + ', ' + obj.y + ']から除外...');
382- var shapeX = Math.ceil(obj.get(THIEF.PARAM.shapeWidth) / this.get(THIEF.PARAM.inventoryCellSize)) || 1;
383- var shapeY = Math.ceil(obj.get(THIEF.PARAM.shapeHeight) / this.get(THIEF.PARAM.inventoryCellSize)) || 1;
400+ THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + obj.x + ', ' + obj.y + ']から除外...');
401+ var shapeX = Math.ceil(obj.get(THIEF.PROP.shapeWidth) / this.get(THIEF.PROP.inventoryCellSize)) || 1;
402+ var shapeY = Math.ceil(obj.get(THIEF.PROP.shapeHeight) / this.get(THIEF.PROP.inventoryCellSize)) || 1;
384403
385404 if (obj.myOwner === this) {
386405 obj.myOwner = null;
@@ -394,7 +413,7 @@
394413 }
395414 }
396415 }
397- THIEF.html.addDebugMessage('...' + obj.get(THIEF.PARAM.displayName) + 'を' + this.get(THIEF.PARAM.displayName) + 'のインベントリ座標[' + objX + ', ' + objY + ']から除外完了。');
416+ THIEF.html.addDebugMessage('...' + obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + objX + ', ' + objY + ']から除外完了。');
398417
399418 return true;
400419 };
@@ -403,7 +422,7 @@
403422
404423 var result = false;
405424
406- THIEF.html.addDebugMessage(obj.get(THIEF.PARAM.displayName) + 'を' + this.get(THIEF.PARAM.displayName) + 'のインベントリ座標[' + x + ', ' + y + ']に追加処理を開始...');
425+ THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + x + ', ' + y + ']に追加処理を開始...');
407426
408427 var target = this.getInventoryFreeSpace(obj, x, y);
409428 if (target.x >= 0 && target.y >= 0) {
@@ -428,17 +447,17 @@
428447
429448 // Item の場合のみアルファベットを設定
430449 if(obj.isItem){
431- THIEF.html.addDebugMessage(obj.get(THIEF.PARAM.displayName) + ' はアイテムなので、アルファベットの割り当てを行う...');
450+ THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + ' はアイテムなので、アルファベットの割り当てを行う...');
432451 var alphabets = this.getInventoryAlphabets();
433- if (typeof obj.get(THIEF.PARAM.alphabet) === 'string' && alphabets.indexOf(obj.get(THIEF.PARAM.alphabet)) === -1) {
452+ if (typeof obj.get(THIEF.PROP.alphabet) === 'string' && alphabets.indexOf(obj.get(THIEF.PROP.alphabet)) === -1) {
434453 // すでにアルファベットが登録済みで、かつ変更の必要は無い
435- THIEF.html.addDebugMessage('すでに割りあたっているもの' + obj.get(THIEF.PARAM.alphabet) + 'が再利用可能。');
454+ THIEF.html.addDebugMessage('すでに割りあたっているもの' + obj.get(THIEF.PROP.alphabet) + 'が再利用可能。');
436455 } else {
437456 var alp = this.getInventoryNonExistAlphabet();
438457 if (typeof alp === 'undefined') {
439458 alert('アルファベット関係の使用制限バグ');
440459 } else {
441- obj[THIEF.PARAM.alphabet] = alp;
460+ obj[THIEF.PROP.alphabet] = alp;
442461 }
443462 THIEF.html.addDebugMessage('新たに ' + alp + ' を割り当てた。')
444463 }
@@ -446,7 +465,7 @@
446465 }
447466
448467 this.inventory[i][j].push(obj);
449- THIEF.html.addDebugMessage('[' + i + ', ' + j + ']に' + obj.get(THIEF.PARAM.alphabet) + 'として追加');
468+ THIEF.html.addDebugMessage('[' + i + ', ' + j + ']に' + obj.get(THIEF.PROP.alphabet) + 'として追加');
450469 result = true;
451470 }
452471 }
@@ -454,7 +473,7 @@
454473 THIEF.html.addDebugMessage('追加可能なスペースがない。');
455474 }
456475
457- THIEF.html.addDebugMessage('...' + obj.get(THIEF.PARAM.displayName) + 'を' + this.get(THIEF.PARAM.displayName) + 'のインベントリ座標[' + x + ', ' + y + ']に追加処理を完了。(return : ' + result + ')');
476+ THIEF.html.addDebugMessage('...' + obj.get(THIEF.PROP.displayName) + 'を' + this.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + x + ', ' + y + ']に追加処理を完了。(return : ' + result + ')');
458477
459478 return result;
460479 };
@@ -461,12 +480,12 @@
461480
462481 THIEF.func.method.getInventoryFreeSpace = function(obj, _x, _y) {
463482
464- var invCellSize = this.get(THIEF.PARAM.inventoryCellSize) || 10;
465- var invWidth = this.get(THIEF.PARAM.inventoryWidth) || 0;
466- var invHeight = this.get(THIEF.PARAM.inventoryHeight) || 0;
467- var invDepth = this.get(THIEF.PARAM.inventoryDepth) || 0;
468- var objShapeWight = obj.get(THIEF.PARAM.shapeWidth) || Math.ceil(obj.get(THIEF.PARAM.siz) / 20) || 1;
469- var objShapeHeight = obj.get(THIEF.PARAM.shapeHeight) || Math.ceil(obj.get(THIEF.PARAM.siz) / 20) || 1;
483+ var invCellSize = this.get(THIEF.PROP.inventoryCellSize) || 10;
484+ var invWidth = this.get(THIEF.PROP.inventoryWidth) || 0;
485+ var invHeight = this.get(THIEF.PROP.inventoryHeight) || 0;
486+ var invDepth = this.get(THIEF.PROP.inventoryDepth) || 0;
487+ var objShapeWight = obj.get(THIEF.PROP.shapeWidth) || Math.ceil(obj.get(THIEF.PROP.siz) / 20) || 1;
488+ var objShapeHeight = obj.get(THIEF.PROP.shapeHeight) || Math.ceil(obj.get(THIEF.PROP.siz) / 20) || 1;
470489 var objInvShapeWight = Math.ceil(objShapeWight / invCellSize);
471490 var objInvShapeHeight = Math.ceil(objShapeHeight / invCellSize);
472491
@@ -476,7 +495,7 @@
476495 var startY = _y || 0;
477496 var once = (typeof _x === "number" || typeof _y === "number");
478497
479- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + 'のインベントリ(' + invHeight + ', ' + invWidth + ', ' + invDepth + ')の座標[' + _x + ', ' + _y + ']に' + obj.get(THIEF.PARAM.displayName) + '(' + objInvShapeWight + ', ' + objInvShapeHeight + ')として格納できるか確認を開始...');
498+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + 'のインベントリ(' + invHeight + ', ' + invWidth + ', ' + invDepth + ')の座標[' + _x + ', ' + _y + ']に' + obj.get(THIEF.PROP.displayName) + '(' + objInvShapeWight + ', ' + objInvShapeHeight + ')として格納できるか確認を開始...');
480499
481500 var free;
482501
@@ -493,9 +512,9 @@
493512 if (this.inventory && this.inventory[targetX] && this.inventory[targetX][targetY]) {
494513 if (this.inventory[targetX][targetY].length <= invDepth) {
495514 var lastObj = this.inventory[targetX][targetY].getLast();
496- if (obj.get(THIEF.PARAM.stackable) || typeof lastObj === 'undefined' || lastObj.get(THIEF.PARAM.stackable) /* || !lastObj.get(THIEF.PARAM.mergeable) */) {
515+ if (obj.get(THIEF.PROP.stackable) || typeof lastObj === 'undefined' || lastObj.get(THIEF.PROP.stackable) /* || !lastObj.get(THIEF.PARAM.mergeable) */) {
497516 if (lastObj) {
498- THIEF.html.addDebugMessage('[' + targetX + ', ' + targetY + ']にある' + lastObj.get(THIEF.PARAM.displayName) + 'には重ねられる。');
517+ THIEF.html.addDebugMessage('[' + targetX + ', ' + targetY + ']にある' + lastObj.get(THIEF.PROP.displayName) + 'には重ねられる。');
499518 } else {
500519 THIEF.html.addDebugMessage('[' + targetX + ', ' + targetY + ']には何も無いので重ねられる。');
501520 }
@@ -534,7 +553,7 @@
534553 }
535554 }
536555
537- THIEF.html.addDebugMessage('...' + obj.get(THIEF.PARAM.displayName) + '(' + objInvShapeWight + ', ' + objInvShapeHeight + ')として格納できるか確認を完了。');
556+ THIEF.html.addDebugMessage('...' + obj.get(THIEF.PROP.displayName) + '(' + objInvShapeWight + ', ' + objInvShapeHeight + ')として格納できるか確認を完了。');
538557
539558 return result;
540559 };
@@ -541,7 +560,7 @@
541560
542561 THIEF.func.method.attackedBy = function(obj) {
543562
544- THIEF.html.addDebugMessage(obj.get(THIEF.PARAM.displayName) + ' による ' + this.get(THIEF.PARAM.displayName) + ' への攻撃処理を開始...');
563+ THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + ' による ' + this.get(THIEF.PROP.displayName) + ' への攻撃処理を開始...');
545564
546565 //my.slot[THIEF.PARAM.slot.hand] = selected[0];
547566 var val;
@@ -559,25 +578,25 @@
559578 var damage = THIEF.util.execRevP(revP);
560579
561580 THIEF.html.addDebugMessage('ベースダメージ : ' + damage );
562- damage += obj.get(THIEF.PARAM.db);
581+ damage += obj.get(THIEF.PROP.db);
563582 THIEF.html.addDebugMessage('ダメージボーナス追加後 : ' + damage);
564- var ac = this.get(THIEF.PARAM.armorPoint);
583+ var ac = this.get(THIEF.PROP.armorPoint);
565584 THIEF.html.addDebugMessage('AC適用後 : ' + (damage - ac));
566585 damage -= ac;
567586
568587 if(damage> 0){
569- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + ' HP : ' + this.get(THIEF.PARAM.hp) + ' -> ' + (this.get(THIEF.PARAM.hp) - damage) + 'とする。');
588+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' HP : ' + this.get(THIEF.PROP.hp) + ' -> ' + (this.get(THIEF.PROP.hp) - damage) + 'とする。');
570589 this.hp -= damage;
571- THIEF.Data.Text.$(THIEF.Data.Text.attack, damage, this.get(THIEF.PARAM.displayName), obj.get(THIEF.PARAM.displayName) );
590+ THIEF.Data.Text.$(THIEF.Data.Text.attack, damage, this.get(THIEF.PROP.displayName), obj.get(THIEF.PROP.displayName) );
572591 } else {
573- THIEF.Data.Text.$(THIEF.Data.Text.defence, this.get(THIEF.PARAM.displayName), obj.get(THIEF.PARAM.displayName));
592+ THIEF.Data.Text.$(THIEF.Data.Text.defence, this.get(THIEF.PROP.displayName), obj.get(THIEF.PROP.displayName));
574593 }
575594
576595 obj.ct -= 100;
577596
578- if (this.get(THIEF.PARAM.hp) <= 0) {
597+ if (this.get(THIEF.PROP.hp) <= 0) {
579598 THIEF.html.addDebugMessage('死亡処理を開始...');
580- THIEF.Data.Text.$(THIEF.Data.Text.killBy, this.get(THIEF.PARAM.displayName), obj.get(THIEF.PARAM.displayName));
599+ THIEF.Data.Text.$(THIEF.Data.Text.killBy, this.get(THIEF.PROP.displayName), obj.get(THIEF.PROP.displayName));
581600 THIEF.global.actLV.removeFromInventory(this);
582601 this.next = function() {
583602 return true
@@ -623,12 +642,12 @@
623642 THIEF.func.method.getInventoryAlphabets = function() {
624643 var alphabets = [];
625644 if(this.inventory){
626- for(var i=0; i<this.get(THIEF.PARAM.inventoryWidth); i++){
645+ for(var i=0; i<this.get(THIEF.PROP.inventoryWidth); i++){
627646 if(this.inventory[i]){
628- for(var j=0; j<this.get(THIEF.PARAM.inventoryHeight); j++){
647+ for(var j=0; j<this.get(THIEF.PROP.inventoryHeight); j++){
629648 if(this.inventory[i][j]){
630649 for(var k=0; k<this.inventory[i][j].length; k++){
631- var alphabet = this.inventory[i][j][k].get(THIEF.PARAM.alphabet);
650+ var alphabet = this.inventory[i][j][k].get(THIEF.PROP.alphabet);
632651 if(alphabet){
633652 alphabets.push(alphabet);
634653 }
@@ -684,8 +703,8 @@
684703
685704 THIEF.html.addDebugMessage('セレクターを生成');
686705 for (i = 0; i < objs.length; i++) {
687- THIEF.html.addDebugMessage('セレクターターゲット:' + objs[i].get(THIEF.PARAM.displayName));
688- if (objs[i] !== this && objs[i].portable && objs[i].get(THIEF.PARAM.displayName)) {
706+ THIEF.html.addDebugMessage('セレクターターゲット:' + objs[i].get(THIEF.PROP.displayName));
707+ if (objs[i] !== this && objs[i].portable && objs[i].get(THIEF.PROP.displayName)) {
689708 items.push(objs[i]);
690709 }
691710 }
@@ -702,7 +721,7 @@
702721 if (THIEF.conf.itemSort[i] === items[j].symbol) {
703722 if (first) {
704723 first = false;
705- THIEF.html.addInfomation('<span style="color:' + THIEF.conf.bgColor + '; background:' + THIEF.conf.textColor + '">' + items[j].get(THIEF.PARAM.symbolName) + '</span>');
724+ THIEF.html.addInfomation('<span style="color:' + THIEF.conf.bgColor + '; background:' + THIEF.conf.textColor + '">' + items[j].get(THIEF.PROP.symbolName) + '</span>');
706725 }
707726
708727 var alphabet;
@@ -718,7 +737,7 @@
718737 items[j].alphabet = alphabet;
719738 }
720739
721- THIEF.html.addInfomation(alphabet + '<span id="' + THIEF.conf.id + '_' + alphabet + '">&nbsp;-&nbsp;</span>' + items[j].get(THIEF.PARAM.displayName));
740+ THIEF.html.addInfomation(alphabet + '<span id="' + THIEF.conf.id + '_' + alphabet + '">&nbsp;-&nbsp;</span>' + items[j].get(THIEF.PROP.displayName));
722741 targets[alphabet] = items[j];
723742 }
724743 }
@@ -866,14 +885,14 @@
866885
867886 THIEF.html.addDebugMessage('移動処理 move(' + dx + ', ' + dy + ') を開始...');
868887
869- THIEF.html.addDebugMessage(THIEF.global.actLV.get(THIEF.PARAM.displayName) + 'のインベントリ座標[' + (this.x + dx) + ', ' + (this.y + dy) + ']を調査を行う。');
888+ THIEF.html.addDebugMessage(THIEF.global.actLV.get(THIEF.PROP.displayName) + 'のインベントリ座標[' + (this.x + dx) + ', ' + (this.y + dy) + ']を調査を行う。');
870889 var target = THIEF.global.actLV.getInventoryXyLastObject(this.x + dx, this.y + dy);
871890
872- if (this.get(THIEF.PARAM.stackable) || target.get(THIEF.PARAM.stackable)) {
891+ if (this.get(THIEF.PROP.stackable) || target.get(THIEF.PROP.stackable)) {
873892 var sX = this.x;
874893 var sY = this.y;
875894
876- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + '[' + this.x + ', ' + this.y + ']は' + target.get(THIEF.PARAM.displayName) + '[' + (this.x + dx) + ', ' + (this.y + dy) + ']の上に移動する。');
895+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + '[' + this.x + ', ' + this.y + ']は' + target.get(THIEF.PROP.displayName) + '[' + (this.x + dx) + ', ' + (this.y + dy) + ']の上に移動する。');
877896 THIEF.global.actLV.removeFromInventory(this);
878897
879898 THIEF.html.addDebugMessage('移動前の座標[' + sX + ', ' + sY + ']の描画を更新');
@@ -889,7 +908,7 @@
889908 this.ct -= 60;
890909
891910 } else {
892- if (target.get(THIEF.PARAM.active)) {
911+ if (target.get(THIEF.PROP.active)) {
893912 THIEF.html.addDebugMessage('active なものが対象なので攻撃してみる。');
894913 target.attackedBy(this);
895914 } else {
@@ -915,12 +934,12 @@
915934 THIEF.func.method.notify = function() {
916935
917936 if (typeof this.inventory !== "undefined") {
918- var width = this.get(THIEF.PARAM.inventoryWidth);
937+ var width = this.get(THIEF.PROP.inventoryWidth);
919938 for (var x = 0; x < width; x++) {
920939 if (typeof this.inventory[x] === "undefined") {
921940 break;
922941 }
923- var length = this.get(THIEF.PARAM.inventoryHeight);
942+ var length = this.get(THIEF.PROP.inventoryHeight);
924943 for (var y = 0; y < length; y++) {
925944 if (typeof this.inventory[x][y] === "undefined") {
926945 break;
@@ -934,44 +953,44 @@
934953 }
935954
936955 // CT を増加
937- if (this.get(THIEF.PARAM.active)) {
956+ if (this.get(THIEF.PROP.active)) {
938957
939958 if(this.ct > 100){
940959 this.ct = 100;
941960 }
942961
943- if (typeof this.get(THIEF.PARAM.dex) === undefined) {
944- this[THIEF.PARAM.ct] += this.get(THIEF.PARAM.dex);
962+ if (typeof this.get(THIEF.PROP.dex) === undefined) {
963+ this[THIEF.PROP.ct] += this.get(THIEF.PROP.dex);
945964 } else {
946- this[THIEF.PARAM.ct] += 33; // test
965+ this[THIEF.PROP.ct] += 33; // test
947966 }
948- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + ' の CT を ' + this[THIEF.PARAM.ct] + ' に増加。');
967+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' の CT を ' + this[THIEF.PROP.ct] + ' に増加。');
949968 }
950969
951970 // ct が 100 を超えていたら行動対象に登録
952- if (this.get(THIEF.PARAM.ct) >= 100) {
953- if (typeof this[THIEF.PARAM.myOwner][THIEF.PARAM.actObjectList] === "undefined") {
954- this[THIEF.PARAM.myOwner][THIEF.PARAM.actObjectList] = [];
971+ if (this.get(THIEF.PROP.ct) >= 100) {
972+ if (typeof this[THIEF.PROP.myOwner][THIEF.PROP.actObjectList] === "undefined") {
973+ this[THIEF.PROP.myOwner][THIEF.PROP.actObjectList] = [];
955974 }
956- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + ' を、オーナ:' + this[THIEF.PARAM.myOwner].get(THIEF.PARAM.displayName) + ' に登録。');
957- this[THIEF.PARAM.myOwner][THIEF.PARAM.actObjectList].push(this);
975+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' を、オーナ:' + this[THIEF.PROP.myOwner].get(THIEF.PROP.displayName) + ' に登録。');
976+ this[THIEF.PROP.myOwner][THIEF.PROP.actObjectList].push(this);
958977 }
959978 };
960979
961980 THIEF.func.method.action = function() {
962981
963- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + ' の行動を開始...');
982+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' の行動を開始...');
964983
965- if (typeof this[THIEF.PARAM.actObjectList] !== 'undefined') {
984+ if (typeof this[THIEF.PROP.actObjectList] !== 'undefined') {
966985
967986 // ct の小さい順にソートする
968- for (var i = 0; i < this[THIEF.PARAM.actObjectList].length - 2; i++) {
987+ for (var i = 0; i < this[THIEF.PROP.actObjectList].length - 2; i++) {
969988 var isSorted = true;
970- for (var j = this[THIEF.PARAM.actObjectList].length - 1; j >= (1 + i); j--) {
971- if (this[THIEF.PARAM.actObjectList][j].get(THIEF.PARAM.ct) < this[THIEF.PARAM.actObjectList][j - 1].get(THIEF.PARAM.ct)) {
972- var swap = this[THIEF.PARAM.actObjectList][j];
973- this[THIEF.PARAM.actObjectList][j] = this[THIEF.PARAM.actObjectList][j - 1];
974- this[THIEF.PARAM.actObjectList][j - 1] = swap;
989+ for (var j = this[THIEF.PROP.actObjectList].length - 1; j >= (1 + i); j--) {
990+ if (this[THIEF.PROP.actObjectList][j].get(THIEF.PROP.ct) < this[THIEF.PROP.actObjectList][j - 1].get(THIEF.PROP.ct)) {
991+ var swap = this[THIEF.PROP.actObjectList][j];
992+ this[THIEF.PROP.actObjectList][j] = this[THIEF.PROP.actObjectList][j - 1];
993+ this[THIEF.PROP.actObjectList][j - 1] = swap;
975994 isSorted = false;
976995 }
977996 }
@@ -981,13 +1000,13 @@
9811000 }
9821001
9831002 // ct の大きい順(配列の最後部)から実行
984- var obj = this[THIEF.PARAM.actObjectList].pop();
985- for (; typeof obj !== 'undefined'; obj = this[THIEF.PARAM.actObjectList].pop()) {
986- THIEF.html.addDebugMessage(obj.get(THIEF.PARAM.displayName) + ' の処理を開始...');
1003+ var obj = this[THIEF.PROP.actObjectList].pop();
1004+ for (; typeof obj !== 'undefined'; obj = this[THIEF.PROP.actObjectList].pop()) {
1005+ THIEF.html.addDebugMessage(obj.get(THIEF.PROP.displayName) + ' の処理を開始...');
9871006 if (obj.action() === false) {
9881007 // 行動が完了しない場合、現在のオブジェクトを再登録して一時停止(結果的に入力を待つ)
989- THIEF.html.addDebugMessage('...' + obj.get(THIEF.PARAM.displayName) + ' は処理が完了しなかった。');
990- this[THIEF.PARAM.actObjectList].push(obj);
1008+ THIEF.html.addDebugMessage('...' + obj.get(THIEF.PROP.displayName) + ' は処理が完了しなかった。');
1009+ this[THIEF.PROP.actObjectList].push(obj);
9911010
9921011 break;
9931012 }
@@ -996,10 +1015,10 @@
9961015 }
9971016
9981017 var result = true;
999- if (typeof this[THIEF.PARAM.actObjectList] === 'undefined' || this[THIEF.PARAM.actObjectList].length === 0) {
1018+ if (typeof this[THIEF.PROP.actObjectList] === 'undefined' || this[THIEF.PROP.actObjectList].length === 0) {
10001019 if (this.active && this.turnEnd !== THIEF.global.turn) {
10011020
1002- if (this.get(THIEF.PARAM.ct) >= 100) {
1021+ if (this.get(THIEF.PROP.ct) >= 100) {
10031022 if (this.next()) {
10041023 this.turnEnd = THIEF.global.turn;
10051024 //this[THIEF.PARAM.ct] -= 100;
@@ -1009,11 +1028,11 @@
10091028 }
10101029 }
10111030 }
1012- } else if (this[THIEF.PARAM.actObjectList].length > 0) {
1031+ } else if (this[THIEF.PROP.actObjectList].length > 0) {
10131032 result = false;
10141033 }
10151034
1016- THIEF.html.addDebugMessage('... ' + this.get(THIEF.PARAM.displayName) + ' の行動を完了。 (result = ' + result + ')');
1035+ THIEF.html.addDebugMessage('... ' + this.get(THIEF.PROP.displayName) + ' の行動を完了。 (result = ' + result + ')');
10171036
10181037 return result;
10191038 };
@@ -1042,7 +1061,7 @@
10421061 } else {
10431062 THIEF.html.addDebugMessage(String.fromCharCode(code) + '(' + code + ')の入力に対する処理を開始...');
10441063 if (typeof THIEF.func.method.manual[code] === 'function') {
1045- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + ' の ' + THIEF.func.method.manual[code] + 'を実行');
1064+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + ' の ' + THIEF.func.method.manual[code] + 'を実行');
10461065 finish = THIEF.func.method.manual[code].apply(this);
10471066 } else {
10481067 finish = false;
@@ -1140,9 +1159,9 @@
11401159 // 重量オーバなら拾えない様にすること
11411160 if (from.removeFromInventory(selected[i])) {
11421161 to.addToInventory(selected[i]);
1143- THIEF.Data.Text.$(THIEF.Data.Text.pickup, selected[i].get(THIEF.PARAM.displayName), to.get(THIEF.PARAM.displayName));
1162+ THIEF.Data.Text.$(THIEF.Data.Text.pickup, selected[i].get(THIEF.PROP.displayName), to.get(THIEF.PROP.displayName));
11441163 } else {
1145- THIEF.Data.Text.$(THIEF.Data.Text.canNotPickup, selected[i].get(THIEF.PARAM.displayName), to.get(THIEF.PARAM.displayName));
1164+ THIEF.Data.Text.$(THIEF.Data.Text.canNotPickup, selected[i].get(THIEF.PROP.displayName), to.get(THIEF.PROP.displayName));
11461165 }
11471166 }
11481167
@@ -1163,12 +1182,12 @@
11631182 // とりあえず一次元配列化
11641183 var list = [];
11651184 if (typeof this.inventory !== 'undefined') {
1166- for (var x = 0; x < this.get(THIEF.PARAM.inventoryWidth); x++) {
1185+ for (var x = 0; x < this.get(THIEF.PROP.inventoryWidth); x++) {
11671186 if (typeof this.inventory[x] === 'undefined') {
11681187 continue;
11691188 }
11701189
1171- for (var y = 0; y < this.get(THIEF.PARAM.inventoryHeight); y++) {
1190+ for (var y = 0; y < this.get(THIEF.PROP.inventoryHeight); y++) {
11721191 if (typeof this.inventory[x][y] === 'undefined') {
11731192 continue;
11741193 }
@@ -1199,15 +1218,15 @@
11991218 if(typeof from.slot !== 'undefined' && typeof from.slot[selected[i].slot] !== 'undefined'){
12001219 delete from.slot[selected[i].slot].equiped;
12011220 delete from.slot[selected[i].slot];
1202- THIEF.Data.Text.$(THIEF.Data.Text.equipNone, from.get(THIEF.PARAM.displayName), selected[i].get(THIEF.PARAM.slotName));
1221+ THIEF.Data.Text.$(THIEF.Data.Text.equipNone, from.get(THIEF.PROP.displayName), selected[i].get(THIEF.PROP.slotName));
12031222 from.ct -= 100;
12041223 }
12051224
12061225 to.addToInventory(selected[i], from.x, from.y);
12071226 from.ct -= 20;
1208- THIEF.Data.Text.$(THIEF.Data.Text.drop, selected[i].get(THIEF.PARAM.displayName), from.get(THIEF.PARAM.displayName), to.get(THIEF.PARAM.displayName));
1227+ THIEF.Data.Text.$(THIEF.Data.Text.drop, selected[i].get(THIEF.PROP.displayName), from.get(THIEF.PROP.displayName), to.get(THIEF.PROP.displayName));
12091228 } else {
1210- THIEF.Data.Text.$(THIEF.Data.Text.canNotDrop, selected[i].get(THIEF.PARAM.displayName), from.get(THIEF.PARAM.displayName), to.get(THIEF.PARAM.displayName));
1229+ THIEF.Data.Text.$(THIEF.Data.Text.canNotDrop, selected[i].get(THIEF.PROP.displayName), from.get(THIEF.PROP.displayName), to.get(THIEF.PROP.displayName));
12111230 }
12121231 }
12131232
@@ -1233,16 +1252,16 @@
12331252
12341253 THIEF.func.command.showInventory = function() {
12351254
1236- THIEF.html.addDebugMessage(this.get(THIEF.PARAM.displayName) + 'のインベントリ表示を開始...');
1255+ THIEF.html.addDebugMessage(this.get(THIEF.PROP.displayName) + 'のインベントリ表示を開始...');
12371256
12381257 var list = [];
12391258 if (typeof this.inventory !== 'undefined') {
1240- for (var x = 0; x < this.get(THIEF.PARAM.inventoryWidth); x++) {
1259+ for (var x = 0; x < this.get(THIEF.PROP.inventoryWidth); x++) {
12411260 if (typeof this.inventory[x] === 'undefined') {
12421261 continue;
12431262 }
12441263
1245- for (var y = 0; y < this.get(THIEF.PARAM.inventoryHeight); y++) {
1264+ for (var y = 0; y < this.get(THIEF.PROP.inventoryHeight); y++) {
12461265 if (typeof this.inventory[x][y] === 'undefined') {
12471266 continue;
12481267 }
@@ -1250,7 +1269,7 @@
12501269 var cell = this.inventory[x][y];
12511270
12521271 for (var i = 0; i < cell.length; i++) {
1253- THIEF.html.addDebugMessage('[' + x + ', ' + y + '] ' + cell[i].get(THIEF.PARAM.displayName));
1272+ THIEF.html.addDebugMessage('[' + x + ', ' + y + '] ' + cell[i].get(THIEF.PROP.displayName));
12541273 list.push(cell[i]);
12551274 }
12561275 }
@@ -1264,7 +1283,7 @@
12641283 this.action = THIEF.func.method.selecter(list, this.action, true, false);
12651284 }
12661285
1267- THIEF.html.addDebugMessage('...' + this.get(THIEF.PARAM.displayName) + 'のインベントリ表示を完了。');
1286+ THIEF.html.addDebugMessage('...' + this.get(THIEF.PROP.displayName) + 'のインベントリ表示を完了。');
12681287
12691288 return false;
12701289 };
@@ -1422,12 +1441,12 @@
14221441 // とりあえず一次元配列化
14231442 var list = [];
14241443 if (typeof this.inventory !== 'undefined') {
1425- for (var x = 0; x < this.get(THIEF.PARAM.inventoryWidth); x++) {
1444+ for (var x = 0; x < this.get(THIEF.PROP.inventoryWidth); x++) {
14261445 if (typeof this.inventory[x] === 'undefined') {
14271446 continue;
14281447 }
14291448
1430- for (var y = 0; y < this.get(THIEF.PARAM.inventoryHeight); y++) {
1449+ for (var y = 0; y < this.get(THIEF.PROP.inventoryHeight); y++) {
14311450 if (typeof this.inventory[x][y] === 'undefined') {
14321451 continue;
14331452 }
@@ -1453,11 +1472,11 @@
14531472 // 既に付けている装備を外す必要があるか
14541473 if(typeof selected[0] !== 'undefined' && typeof my.slot[selected[0].slot] !== 'undefined'){
14551474 if(selected[0] === my.slot[selected[0].slot]){
1456- THIEF.Data.Text.$(THIEF.Data.Text.equipAlready, selected[0].get(THIEF.PARAM.displayName), my.get(THIEF.PARAM.displayName));
1475+ THIEF.Data.Text.$(THIEF.Data.Text.equipAlready, selected[0].get(THIEF.PROP.displayName), my.get(THIEF.PROP.displayName));
14571476 selected[0] = undefined;
14581477 } else {
14591478 // 何も渡されないなら、手の装備を外す
1460- THIEF.Data.Text.$(THIEF.Data.Text.equipNone, my.get(THIEF.PARAM.displayName), selected[0].get(THIEF.PARAM.slotName));
1479+ THIEF.Data.Text.$(THIEF.Data.Text.equipNone, my.get(THIEF.PROP.displayName), selected[0].get(THIEF.PROP.slotName));
14611480 delete my.slot[selected[0].slot].equiped;
14621481 delete my.slot[selected[0].slot];
14631482 }
@@ -1467,8 +1486,8 @@
14671486 if(typeof selected[0] !== 'undefined'){
14681487 my.slot[selected[0].slot] = selected[0];
14691488 my.slot[selected[0].slot].equiped = true;
1470- THIEF.Data.Text.$(THIEF.Data.Text.equipItem, selected[0].get(THIEF.PARAM.displayName), my.get(THIEF.PARAM.displayName), selected[0].get(THIEF.PARAM.slotName));
1471- THIEF.html.addDebugMessage(selected[0].get(THIEF.PARAM.displayName) + ' を装備した。');
1489+ THIEF.Data.Text.$(THIEF.Data.Text.equipItem, selected[0].get(THIEF.PROP.displayName), my.get(THIEF.PROP.displayName), selected[0].get(THIEF.PROP.slotName));
1490+ THIEF.html.addDebugMessage(selected[0].get(THIEF.PROP.displayName) + ' を装備した。');
14721491 my.ct -= 100;
14731492 }
14741493 }
@@ -1941,10 +1960,10 @@
19411960 var lv = THIEF.util.factory(THIEF.Data.Obj.$Level);
19421961 lv.mapRefreshPointList = [];
19431962 lv.inventory = THIEF.util.createMap(THIEF.conf.mapWidth, THIEF.conf.mapHeight);
1944- lv[THIEF.PARAM.name] = {ja:'テストレベル', en:'Practice'};
1945- lv[THIEF.PARAM.inventoryWidth] = THIEF.conf.mapWidth;
1946- lv[THIEF.PARAM.inventoryHeight] = THIEF.conf.mapHeight;
1947- lv[THIEF.PARAM.inventoryDepth] = THIEF.conf.mapDepth;
1963+ lv[THIEF.PROP.name] = {ja:'テストレベル', en:'Practice'};
1964+ lv[THIEF.PROP.inventoryWidth] = THIEF.conf.mapWidth;
1965+ lv[THIEF.PROP.inventoryHeight] = THIEF.conf.mapHeight;
1966+ lv[THIEF.PROP.inventoryDepth] = THIEF.conf.mapDepth;
19481967 lv.inventoryCellSize = 1;
19491968 return lv;
19501969 };
@@ -2324,8 +2343,8 @@
23242343 // 空きスペースの検索条件
23252344 var point;
23262345 while (true) {
2327- var x = Math.round(Math.random() * THIEF.global.actLV.get(THIEF.PARAM.inventoryWidth));
2328- var y = Math.round(Math.random() * THIEF.global.actLV.get(THIEF.PARAM.inventoryHeight));
2346+ var x = Math.round(Math.random() * THIEF.global.actLV.get(THIEF.PROP.inventoryWidth));
2347+ var y = Math.round(Math.random() * THIEF.global.actLV.get(THIEF.PROP.inventoryHeight));
23292348 point = THIEF.global.actLV.getInventoryFreeSpace(monster, x, y);
23302349
23312350 if (typeof point !== 'undefined' && THIEF.global.actLV.inventory[x][y].getLast().isBasedOn(THIEF.Data.Obj.LitFloor)) {
@@ -2926,7 +2945,7 @@
29262945 if(this.equiped){
29272946 text += '[E] '
29282947 }
2929- text += this.get(THIEF.PARAM.name) + '(<span style="color:' + this.get(THIEF.PARAM.color) + '">' + this.get(THIEF.PARAM.symbol) + '</span>)';
2948+ text += this.get(THIEF.PROP.name) + '(<span style="color:' + this.get(THIEF.PROP.color) + '">' + this.get(THIEF.PROP.symbol) + '</span>)';
29302949 return text;
29312950 },
29322951
@@ -2959,8 +2978,6 @@
29592978 // STR のみ定義されている場合
29602979 if (this.str >= 25) {
29612980 val += (this.str / 2.27);
2962- } else if (this.str > 29) {
2963- val += (this.str - 14);
29642981 } else if (this.str >= 18.99) {
29652982 val += 4;
29662983 } else if (this.str > 18) {
Show on old repository browser