475 lines
No EOL
16 KiB
JavaScript
475 lines
No EOL
16 KiB
JavaScript
//=============================================================================
|
||
// MW_EquipScene.js
|
||
//=============================================================================
|
||
/*:
|
||
* @plugindesc 装備シーンをカスタマイズするプラグイン
|
||
* @author 銀河
|
||
* @help
|
||
* 装備シーンをカスタマイズするプラグインです。アイテム欄やショップウィンドウのヘルプ文の幅も変更します。
|
||
*
|
||
* @param Text Variables
|
||
* @type variable
|
||
* @desc メッセージを格納する変数を指定します(MPP_RemovoEquipText.jsと合わせる)
|
||
* @default 1
|
||
* @min 1
|
||
*
|
||
* @param HelpWeapon
|
||
* @desc ヘルプ文に表示する文字列(武器)
|
||
* @default 武器を外します。
|
||
*
|
||
* @param HelpArmor
|
||
* @desc ヘルプ文に表示する文字列(衣装)
|
||
* @default 防具を外します。
|
||
*
|
||
* @param HelpAccessory
|
||
* @desc ヘルプ文に表示する文字列(装飾品)
|
||
* @default 装飾品を外します。
|
||
*
|
||
* @param HelpHStatus
|
||
* @desc エロステータス画面のヘルプ文に表示する文字列
|
||
* @default \\fs[16]エロステータス画面を終了します。
|
||
*
|
||
* @param BattleSkill
|
||
* @desc 戦闘画面のヘルプ文に表示する文字列(何も無い時)
|
||
* @default 使用できるスキルがありません。
|
||
*/
|
||
|
||
(function() {
|
||
|
||
|
||
var MW_EquipScene = { params: PluginManager.parameters('MW_EquipScene') };
|
||
MW_EquipScene.TextVariables = !!eval(MW_EquipScene.params['Text Variables']);
|
||
MW_EquipScene.HelpWeapon = MW_EquipScene.params['HelpWeapon'];
|
||
MW_EquipScene.HelpArmor = MW_EquipScene.params['HelpArmor'];
|
||
MW_EquipScene.HelpAccessory = MW_EquipScene.params['HelpAccessory'];
|
||
MW_EquipScene.HelpHStatus = MW_EquipScene.params['HelpHStatus'];
|
||
|
||
var _Window_Help_prototype_setItem = Window_Help.prototype.setItem
|
||
Window_Help.prototype.setItem = function(item) {
|
||
if(SceneManager._scene.constructor === Scene_Item){
|
||
this.setText(item ? item.description : "");
|
||
}else{
|
||
if($gameVariables.value(MW_EquipScene.TextVariables) == 0){
|
||
$gameVariables.setValue(MW_EquipScene.TextVariables,MW_EquipScene.HelpWeapon);
|
||
}
|
||
if(SceneManager._scene._sceneName == "Scene_Achievement"){
|
||
$gameVariables.setValue(MW_EquipScene.TextVariables,MW_EquipScene.HelpHStatus);
|
||
}
|
||
|
||
if(item == "Weapon_help"){
|
||
this.setText(MW_EquipScene.HelpWeapon);
|
||
}else if(item == "Armor_help"){
|
||
this.setText(MW_EquipScene.HelpArmor);
|
||
|
||
}else if(item == "Accessory_help"){
|
||
this.setText(MW_EquipScene.HelpAccessory);
|
||
}else if(SceneManager._scene.constructor === Scene_Battle || SceneManager._scene.constructor === Scene_Skill){
|
||
this.setText(item ? item.description : "");
|
||
}else{
|
||
this.setText(item ? item.description : $gameVariables.value(MW_EquipScene.TextVariables));
|
||
}
|
||
}
|
||
};
|
||
|
||
var _Window_Help_prototype_initialize=Window_Help.prototype.initialize
|
||
Window_Help.prototype.initialize = function(numLines) {
|
||
var width = Graphics.boxWidth;
|
||
var height = this.fittingHeight(numLines || 2);
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
height = this.fittingHeight(2.5);
|
||
}
|
||
Window_Base.prototype.initialize.call(this, 0, 0, width, height);
|
||
this._text = '';
|
||
};
|
||
|
||
var _Window_Selectable_prototype_itemRect = Window_Selectable.prototype.itemRect;
|
||
Window_Selectable.prototype.itemRect = function(index) {
|
||
var rect = new Rectangle();
|
||
var maxCols = this.maxCols();
|
||
rect.width = this.itemWidth();
|
||
rect.height = this.itemHeight();
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
rect.height -=6;
|
||
}
|
||
rect.x = index % maxCols * (rect.width + this.spacing()) - this._scrollX;
|
||
rect.y = Math.floor(index / maxCols) * rect.height - this._scrollY;
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
rect.y -=(Math.floor(this._scrollY/36) * -6)
|
||
}
|
||
return rect;
|
||
};
|
||
|
||
Window_Base.prototype.standardFontSize = function() {
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
return Yanfly.Param.FontSize-6;
|
||
}else{
|
||
return Yanfly.Param.FontSize;
|
||
}
|
||
};
|
||
|
||
var _Window_Base_prototype_drawIcon = Window_Base.prototype.drawIcon;
|
||
Window_Base.prototype.drawIcon = function(iconIndex, x, y) {
|
||
var bitmap = ImageManager.loadSystem('IconSet');
|
||
var pw = Window_Base._iconWidth;
|
||
var ph = Window_Base._iconHeight;
|
||
var sx = iconIndex % 16 * pw;
|
||
var sy = Math.floor(iconIndex / 16) * ph;
|
||
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
this.contents.blt(bitmap, sx, sy, pw, ph, x, y,26,26);
|
||
}else{
|
||
this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
|
||
}
|
||
};
|
||
|
||
var _Window_ItemList_prototype_maxCols=Window_ItemList.prototype.maxCols;
|
||
Window_ItemList.prototype.maxCols = function() {
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
return 1;
|
||
}else{
|
||
return 2;
|
||
}
|
||
};
|
||
|
||
var _Window_Selectable_prototype_maxPageRows=Window_Selectable.prototype.maxPageRows;
|
||
Window_Selectable.prototype.maxPageRows = function() {
|
||
var pageHeight = this.height - this.padding * 2;
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
return Math.floor(pageHeight / (this.itemHeight()-6));
|
||
}else{
|
||
return Math.floor(pageHeight / this.itemHeight());
|
||
}
|
||
};
|
||
|
||
var _Window_ItemList_prototype_drawItemNumber=Window_ItemList.prototype.drawItemNumber;
|
||
Window_ItemList.prototype.drawItemNumber = function(item, x, y, width) {
|
||
if(SceneManager._scene.constructor === Scene_Equip){
|
||
x-=286;
|
||
}
|
||
if (this.needsNumber()) {
|
||
this.drawText(':', x, y, width - this.textWidth('00'), 'right');
|
||
this.drawText($gameParty.numItems(item), x, y, width, 'right');
|
||
}
|
||
};
|
||
|
||
var Window_Selectable_prototype_select=Window_Selectable.prototype.select;
|
||
Window_Selectable.prototype.select = function(index) {
|
||
this._index = index;
|
||
this._stayCount = 0;
|
||
|
||
//装備シーンかつカーソルに項目がある場合に動作(装備を外すボタンはdataが無いのでそれをケア)
|
||
if(SceneManager._scene.constructor === Scene_Equip && this._data){
|
||
var equip_id = this._data && index >= 0 && !!this._data[index] ? this._data[index].id : null;
|
||
var name = "[Character]1-";
|
||
var FaceName = "[Face]1-";
|
||
face_id = getActorFaces(equip_id);
|
||
var hypno = false
|
||
if([25, 28, 30].includes(equip_id) && $gameSwitches.value(215))hypno = true;
|
||
if([25, 28, 30].includes(equip_id) && !$gameSwitches.value(253))hypno = true;
|
||
if(this._slotId == 1){
|
||
if(equip_id != null){
|
||
name += equip_id < 10 ? "0"+ equip_id : equip_id;
|
||
if(equip_id == 4 && $gameSwitches.value(153)){name += "-Sukebe"}
|
||
$gameScreen.showPicture(80, name, 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(80-165, name, 0, 0, 0, 100, 100, 255, 0);
|
||
if(!hypno){
|
||
$gameScreen.showPicture(81,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}else{
|
||
$gameScreen.showPicture(81,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}
|
||
$gameVariables.setValue(292,equip_id);
|
||
$gameVariables.setValue(293,face_id);
|
||
}else if(equip_id == null && this._data[index] === null){
|
||
name += "01";
|
||
if(equip_id == 4 && $gameSwitches.value(153)){name += "-Sukebe"}
|
||
$gameScreen.showPicture(80, name, 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(80-165, name, 0, 0, 0, 100, 100, 255, 0);
|
||
if(!hypno){
|
||
$gameScreen.showPicture(81,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}else{
|
||
$gameScreen.showPicture(81,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}
|
||
$gameVariables.setValue(292,equip_id);
|
||
$gameVariables.setValue(293,face_id);
|
||
}
|
||
}
|
||
}
|
||
this.ensureCursorVisible();
|
||
this.updateCursor();
|
||
this.callUpdateHelp();
|
||
};
|
||
|
||
var _Window_Selectable_prototype_setHelpWindowItem = Window_Selectable.prototype.setHelpWindowItem;
|
||
Window_Selectable.prototype.setHelpWindowItem = function(item) {
|
||
if (this._helpWindow) {
|
||
if(SceneManager._scene.constructor === Scene_Equip && item == null && this.constructor === Window_EquipSlot){
|
||
switch(this._index){
|
||
case 0:
|
||
item = "Weapon_help"
|
||
break;
|
||
case 1:
|
||
item = "Armor_help"
|
||
break;
|
||
case 2:
|
||
case 3:
|
||
case 4:
|
||
case 5:
|
||
item = "Accessory_help"
|
||
break;
|
||
default:
|
||
item = "Weapon_help"
|
||
break;
|
||
}
|
||
}
|
||
this._helpWindow.setItem(item);
|
||
}
|
||
};
|
||
|
||
//-----------------------------------------------------------------------------
|
||
// Scene_Equip
|
||
//
|
||
|
||
var _Scene_Equip_prototype_onItemOk = Scene_Equip.prototype.onItemOk;
|
||
Scene_Equip.prototype.onItemOk = function() {
|
||
if(this._slotWindow.index()==0){
|
||
SoundManager.playEquip();
|
||
}else{
|
||
AudioManager.playSe({"name":"Equip2","volume":90,"pitch":100,"pan":0});
|
||
}
|
||
this.actor().changeEquip(this._slotWindow.index(), this._itemWindow.item());
|
||
|
||
if($gameActors.actor(1).equips()[1] == null){
|
||
$gameMessage.setBackground(2)
|
||
$gameMessage.add("\\CE[519]\\^")
|
||
}
|
||
this._slotWindow.activate();
|
||
this._slotWindow.refresh();
|
||
this._itemWindow.deselect();
|
||
this._itemWindow.refresh();
|
||
this._statusWindow.refresh();
|
||
|
||
//OKボタンを押した時の処理
|
||
if(SceneManager._scene.constructor === Scene_Equip && this._slotWindow.index()==1){
|
||
if($gameActors.actor(1).equips()[1] != null){
|
||
$gameVariables.setValue(294,$gameActors.actor(1).equips()[1].id);
|
||
}else{
|
||
$gameVariables.setValue(294,0);
|
||
}
|
||
}
|
||
};
|
||
|
||
var _Scene_Equip_prototype_onItemCancel=Scene_Equip.prototype.onItemCancel
|
||
Scene_Equip.prototype.onItemCancel = function() {
|
||
this._slotWindow.activate();
|
||
this._itemWindow.deselect();
|
||
//キャンセルボタンを押した時は決定前の表情に戻る
|
||
if(SceneManager._scene.constructor === Scene_Equip && this._slotWindow.index()==1){
|
||
var name ="[Character]1-"
|
||
var equip_id = $gameVariables.value(294);
|
||
|
||
if($gameActors.actor(1).equips()[1] != null){
|
||
name += equip_id < 10 ? "0"+ equip_id : equip_id;
|
||
}else{
|
||
name += "01";
|
||
}
|
||
face_id = getActorFaces(equip_id);
|
||
var hypno = false
|
||
if([25, 28, 30].includes(equip_id) && $gameSwitches.value(215))hypno = true;
|
||
if([25, 28, 30].includes(equip_id) && !$gameSwitches.value(253))hypno = true;
|
||
if(equip_id == 4 && $gameSwitches.value(153)){name += "-Sukebe"}
|
||
$gameScreen.showPicture(80,name, 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(80-165,name, 0, 0, 0, 100, 100, 255, 0);
|
||
if(!hypno){
|
||
$gameScreen.showPicture(81,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}else{
|
||
$gameScreen.showPicture(81,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
$gameScreen.showPicture(81-165,"[Face]1-Hypno-" + ("000" + face_id).slice( -4 ), 0, 0, 0, 100, 100, 255, 0);
|
||
}
|
||
$gameVariables.setValue(292,equip_id);
|
||
$gameVariables.setValue(293,face_id);
|
||
}
|
||
};
|
||
//■表情早見メモ
|
||
//01:喜び 02:困(開) 03:怒(閉) 04:恥 05:普通 06:嬉しい 07:淫恥 08:驚 09:照 10:呆れ
|
||
//11:苦笑 12:ジト 13:焦り 14:悲しい 15:疲れ 16:困(閉) 17:モジモジ 18:悪 19:照怒 20:ぐるぐる目
|
||
//21:淫喜(開) 22:痛い 23:怒(開) 24:くっ 25:照もじ 26:にへら 27:淫困 28:ドヤ 29:淫普 30:発情困り
|
||
//31:淫喜(閉) 32:クッニヤ 33:ジト恥 34:発情喜 35:照隠 36:強気ドヤ 37:ツッコミ 38:催眠39:くっ 40:くっ
|
||
//41:照レイジケ 42:時止 43:ジトニヤリ 44:照レツッコミ
|
||
|
||
getActorFaces = function(id){
|
||
var num = 1;
|
||
switch (id) {
|
||
case null: //装備無し
|
||
if($gameVariables.value(109)<2000) return 20;
|
||
else if($gameVariables.value(109)<3000) return 7;
|
||
else return 35;
|
||
|
||
case 1: //全裸
|
||
return 7;
|
||
|
||
case 2: //全裸(変身)
|
||
return 20;
|
||
|
||
case 4: //夢見学園の制服
|
||
if($gameVariables.value(112)<2500) return 1;
|
||
else return 21;
|
||
|
||
case 6: //変身1段階目
|
||
if($gameVariables.value(27)<30) return 20;
|
||
else if($gameVariables.value(29)<100) return 7;
|
||
else if($gameVariables.value(31)<100) return 33;
|
||
else return 31;
|
||
|
||
case 7: //変身2段階目
|
||
if($gameVariables.value(24)<100) return 7;
|
||
else if($gameVariables.value(31)<100) return 33;
|
||
else return 35;
|
||
|
||
case 8: //変身3段階目
|
||
return 21;
|
||
|
||
case 10: //ノーブラミニスカート
|
||
return 7;
|
||
|
||
case 11: //アメスク
|
||
if(!$gameSwitches.value(405)) return 17;
|
||
else if(!$gameSwitches.value(406)) return 21;
|
||
else return 35;
|
||
|
||
case 13: //助平の湯の会員証
|
||
if(!$gameSwitches.value(425)) return 1;
|
||
else return 21;
|
||
|
||
case 17: //スケベメイド
|
||
if($gameVariables.value(109)<1500) return 24;
|
||
return 32;
|
||
|
||
case 21: //黒ビキニ
|
||
if($gameVariables.value(112)<2500) return 1;
|
||
else return 21;
|
||
|
||
case 22: //マイクロビキニ
|
||
if(!$gameSwitches.value(542)) return 24;
|
||
else if(!$gameSwitches.value(543)) return 17;
|
||
else return 32;
|
||
|
||
case 23: //スクール水着
|
||
if($gameVariables.value(112)<2500) return 4;
|
||
else return 26;
|
||
|
||
case 24: //穴あきスクール水着
|
||
return 20;
|
||
|
||
case 25: //改造スクール水着
|
||
if($gameSwitches.value(215)){
|
||
return 7;
|
||
}else{
|
||
if($gameSwitches.value(253)){
|
||
return 7;
|
||
}else{
|
||
if($gameVariables.value(24)<100){
|
||
return 5;
|
||
}else{
|
||
return 32;
|
||
}
|
||
}
|
||
}
|
||
case 26: //体操服
|
||
if($gameVariables.value(112)<2500) return 4;
|
||
else return 26;
|
||
|
||
case 27: //ノーブラ体操服
|
||
return 7;
|
||
|
||
case 28: //改造体操服
|
||
if($gameSwitches.value(215)){
|
||
return 7;
|
||
}else{
|
||
if($gameSwitches.value(253)){
|
||
return 7;
|
||
}else{
|
||
if($gameVariables.value(24)<100){
|
||
return 5;
|
||
}else{
|
||
return 32;
|
||
}
|
||
}
|
||
}
|
||
case 30: //スケベ制服
|
||
if($gameSwitches.value(215)){
|
||
return 7;
|
||
}else{
|
||
if($gameSwitches.value(253)){
|
||
return 7;
|
||
}else{
|
||
if($gameVariables.value(24)<100){
|
||
return 5;
|
||
}else{
|
||
return 32;
|
||
}
|
||
}
|
||
}
|
||
case 32: //ハートリング水着
|
||
return 20;
|
||
|
||
case 33: //ドスケベチャイナ服
|
||
return 7;
|
||
|
||
case 149: //牛柄ビキニ
|
||
return 33;
|
||
|
||
case 152: //スケベな私服
|
||
if($gameVariables.value(109)<1500) return 20;
|
||
else if($gameVariables.value(109)<3000) return 17;
|
||
else if(!$gameSwitches.value(436)) return 17;
|
||
return 35;
|
||
|
||
case 161: //バニー
|
||
if($gameVariables.value(109)<750) return 33;
|
||
else if(!$gameSwitches.value(624)) return 32;
|
||
return 21;
|
||
|
||
case 162: //逆バニー
|
||
if($gameVariables.value(109)<1500) return 20;
|
||
else if($gameVariables.value(109)<3000) return 33;
|
||
return 35;
|
||
case 163: //立ち絵確認専用衣装
|
||
return 0
|
||
|
||
default:
|
||
var RandomfaceId = 1;
|
||
if([9,14,34,145,156,164,166,167,168].includes(id)){ //エロレベル1
|
||
if($gameVariables.value(109)<1500){
|
||
RandomfaceId = Math.random() < 0.5 ? 7 : 17;
|
||
}else if($gameVariables.value(109)<3000){
|
||
RandomfaceId = Math.random() < 0.33 ? 32 : (Math.random() < 0.5 ? 33 : 35);
|
||
}else{
|
||
RandomfaceId = Math.random() < 0.5 ? 21 : 31;
|
||
}
|
||
}else if([12,16,19,29,146,153,154,155,158,165,170].includes(id)){ //エロレベル2
|
||
if($gameVariables.value(109)<1500){
|
||
RandomfaceId = Math.random() < 0.5 ? 7 : 24;
|
||
}else if($gameVariables.value(109)<3000){
|
||
RandomfaceId = Math.random() < 0.5 ? 17 : 33;
|
||
}else{
|
||
RandomfaceId = Math.random() < 0.33 ? 32 : (Math.random() < 0.5 ? 33 : 35);
|
||
}
|
||
}else if([15,20,31,144,147,148,157,159,160,169].includes(id)){ //エロレベル3
|
||
if($gameVariables.value(109)<1500){
|
||
RandomfaceId = Math.random() < 0.5 ? 20 : 24;
|
||
}else if($gameVariables.value(109)<3000){
|
||
RandomfaceId = Math.random() < 0.5 ? 7 : 17;
|
||
}else{
|
||
RandomfaceId = Math.random() < 0.33 ? 32 : (Math.random() < 0.5 ? 33 : 35);
|
||
}
|
||
}
|
||
return RandomfaceId;
|
||
}
|
||
};
|
||
|
||
})(); |