添加了普攻替换插件 #3

main
Salted 2 years ago
parent b1e48302e3
commit 19c3839986
Signed by: SaltedFish
GPG Key ID: FCF3F47D9BD7AD42

@ -21,6 +21,7 @@
## 更新记录
- **2022/9/17****咸鱼**;添加了普攻替换插件
- **2022/9/7****面具**;数值整理,素材整理,添加怪物
- **2022/8/30****不明枪兵**;更新海上的剧情
- **2022/8/25****不明枪兵**;更新海滩前的剧情

@ -31,6 +31,7 @@ var $plugins =
{"name":"YEP_AbsorptionBarrier","status":true,"description":"v1.05 吸收屏障☁️","parameters":{"Barrier State":"0","Barrier Color 1":"13","Barrier Color 2":"5","Barrier Animation":"0","Break Animation":"0","Barrier Popup":"255, 0, 255, 160","Display 0 HP Damage":"false","Clear Per Battle":"true","Clear on Death":"true","Default Penetration Rate":"0","Default Penetration Flat":"0"}},
{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}},
{"name":"SF_SkillUpdate","status":true,"description":"v1.0 Allows you to auto Update skills.","parameters":{}},
{"name":"SF_CommonAttack","status":true,"description":"v1.0 普攻替换插件","parameters":{}},
{"name":"SF_QuestSystem","status":true,"description":"v1.0 Allows you to show quests.","parameters":{"Quest List Window":"","Quest List Window X":"260","Quest List Window Y":"90","Quest List Window Width":"120","Quest List Window Height":"370","Quest List Window Font Size":"18","Quest Detail Window":"","Quest Detail Window X":"380","Quest Detail Window Y":"90","Quest Detail Window Width":"440","Quest Detail Window Height":"370","Quest Detail Window Font Size":"18","Quest Editor":"","Quest Editor Enable":"false","Quest List Info X":"0","Quest List Info Y":"90","Quest List Info Width":"240","Quest List Info Height":"370","Quest List Info Font Size":"18"}},
{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}},
{"name":"MOG_ActorHud","status":true,"description":"(v2.0 *) Adiciona uma Hud com os parâmetros do personagem.","parameters":{"-> MAIN <<<<<<<<<<<<<<<<<<<<<<<":"","Initial Visible":"true","Hud X-Axis":"0","Hud Y-Axis":"0","Smart Fade":"true","Auto Fade":"true","":"","-> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<":"","Layout Overlay Visible":"false","Layout Overlay X-Axis":"0","Layout Overlay Y-Axis":"0","-> FACE <<<<<<<<<<<<<<<<<<<<<<<":"","Face Visible":"true","Face X-Axis":"51","Face Y-Axis":"50","Face Priority":"1","-> NAME <<<<<<<<<<<<<<<<<<<<<<<":"","Name Visible":"false","Name X-Axis":"5","Name Y-Axis":"20","Name Font Size":"20","Name Bold Size":"4","Name Font Italic":"false","-> HP <<<<<<<<<<<<<<<<<<<<<<<":"","HP Meter Visible":"true","HP Meter X-Axis":"110","HP Meter Y-Axis":"33","HP Meter Angle":"0","HP Meter Flow Anime":"true","HP Meter Flow Speed":"4","HP Number Visible":"false","HP Number Align":"0","HP Number X-Axis":"270","HP Number Y-Axis":"70","MaxHP Number Visible":"false","MaxHP Number X-Axis":"185","MaxHP Number Y-Axis":"40","HP Icon Visible":"false","HP Icon Half Mode":"false","HP Icon Max Colors":"2","HP Icon Max Rows":"10","HP Icon Max Columns":"2","HP Icon X-Axis":"143","HP Icon Y-Axis":"85","HP Icon Space X":"0","HP Icon Space Y":"0","HP Icon Zoom Anime":"true","-> MP <<<<<<<<<<<<<<<<<<<<<<<":"","MP Meter Visible":"true","MP Meter X-Axis":"110","MP Meter Y-Axis":"48","MP Meter Angle":"0","MP Meter Flow Anime":"true","MP Meter Flow Speed":"4","MP Number Visible":"false","MP Number Align":"0","MP Number X-Axis":"287","MP Number Y-Axis":"100","MaxMP Number Visible":"false","MaxMP Number X-Axis":"196","MaxMP Number Y-Axis":"78","MP Icon Visible":"false","MP Icon Half Mode":"false","MP Icon Max Colors":"2","MP Icon Max Rows":"10","MP Icon Max Columns":"2","MP Icon X-Axis":"143","MP Icon Y-Axis":"120","MP Icon Space X":"0","MP Icon Space Y":"0","MP Icon Zoom Anime":"true","-> TP <<<<<<<<<<<<<<<<<<<<<<<":"","TP Meter Visible":"false","TP Meter X-Axis":"143","TP Meter Y-Axis":"50","TP Meter Angle":"0","TP Meter Flow Anime":"true","TP Meter Flow Speed":"4","TP Number Visible":"false","TP Number Align":"0","TP Number X-Axis":"270","TP Number Y-Axis":"130","MaxTP Number Visible":"false","MaxTP Number X-Axis":"185","MaxTP Number Y-Axis":"116","TP Icon Visible":"false","TP Icon Half Mode":"false","TP Icon Max Colors":"2","TP Icon Max Rows":"10","TP Icon Max Columns":"2","TP Icon X-Axis":"143","TP Icon Y-Axis":"50","TP Icon Space X":"0","TP Icon Space Y":"0","TP Icon Zoom Anime":"true","-> EXP <<<<<<<<<<<<<<<<<<<<<<<":"","EXP Meter Visible":"true","EXP Meter X-Axis":"110","EXP Meter Y-Axis":"63","EXP Meter Angle":"0","Level Number Visible":"false","Level Number Align":"1","Level Number X-Axis":"65","Level Number Y-Axis":"153","-> STATES <<<<<<<<<<<<<<<<<<<<<<<":"","States Visible":"false","States X-Axis":"5","States Y-Axis":"64"}},

@ -0,0 +1,123 @@
//=============================================================================
// Salted Fish Plugins - Common Attack
// SF_CommonAttack.js
//=============================================================================
"use strict";
var Imported = Imported || {};
Imported.SF_CommonAttack = true;
var SF_Plugins = SF_Plugins || {};
SF_Plugins.SF_CommonAttack = SF_Plugins.SF_CommonAttack || {};
SF_Plugins.SF_CommonAttack.version = 1.0;
//=============================================================================
/*:
*
* @plugindesc v1.0 普攻替换插件
* @author Salted Fish
*
* @help
* ===========================================================================
* 介绍
* ===========================================================================
* 插件可以将普通攻击依据不同的职业武器状态等替换为不同的技能
*
* ===========================================================================
* 使用
* ===========================================================================
*
* 在职业武器状态的备注中添加如下标签
* <SF_CommonAttack: SkillID, Priority>
*
* 在普攻时依次遍历职业武器状态选取优先级最高的技能
* 如果优先级相同则使用最后遍历到的技能
*
* 优先级必须大于0且为整数
* 技能ID就是rm数据库中的编号
*/
//=============================================================================
//=============================================================================
// DataManager
//=============================================================================
SF_Plugins.SF_CommonAttack.DataManager_isDatabaseLoaded =
DataManager.isDatabaseLoaded;
DataManager.isDatabaseLoaded = function () {
if (!SF_Plugins.SF_CommonAttack.DataManager_isDatabaseLoaded.call(this)) {
return false;
}
if (!this.SF_CommonAttack_isDatabaseLoaded($dataClasses)) {
return false;
}
if (!this.SF_CommonAttack_isDatabaseLoaded($dataWeapons)) {
return false;
}
if (!this.SF_CommonAttack_isDatabaseLoaded($dataStates)) {
return false;
}
return true;
};
DataManager.SF_CommonAttack_isDatabaseLoaded = function (group) {
var note = /<SF_CommonAttack:\s*?(\d+),\s*?(\d+)>/i;
for (var i = 1; i < group.length; i++) {
var obj = group[i];
var notedata = obj.note.split(/[\r\n]+/);
for (var j = 0; j < notedata.length; j++) {
var line = notedata[j];
if (line.match(note)) {
obj.SF_CommonAttack_Skill_ID = parseInt(RegExp.$1);
obj.SF_CommonAttack_Priority = parseInt(RegExp.$2);
}
}
}
return true;
};
//=============================================================================
// Game_Actor
//=============================================================================
SF_Plugins.SF_CommonAttack.Game_Actor_attackSkillId =
Game_Actor.prototype.attackSkillId;
Game_Actor.prototype.attackSkillId = function () {
var normalId =
SF_Plugins.SF_CommonAttack.Game_Actor_attackSkillId.call(this);
var maxPriority = 0;
// 职业
var currentClass = this.currentClass();
if (currentClass.SF_CommonAttack_Priority >= maxPriority) {
maxPriority = currentClass.SF_CommonAttack_Priority;
normalId = currentClass.SF_CommonAttack_Skill_ID;
}
// 武器
this.weapons().forEach(function (weapon) {
if (weapon.SF_CommonAttack_Priority >= maxPriority) {
maxPriority = weapon.SF_CommonAttack_Priority;
normalId = weapon.SF_CommonAttack_Skill_ID;
}
});
// 状态
this.states().forEach(function (state) {
if (state.SF_CommonAttack_Priority >= maxPriority) {
maxPriority = state.SF_CommonAttack_Priority;
normalId = state.SF_CommonAttack_Skill_ID;
}
});
return normalId;
};
//=============================================================================
// SceneBattle
//=============================================================================
SF_Plugins.SF_CommonAttack.Scene_Battle_commandAttack =
Scene_Battle.prototype.commandAttack;
Scene_Battle.prototype.commandAttack = function () {
BattleManager.inputtingAction().setAttack();
this.onSelectAction();
};
Loading…
Cancel
Save