完善护盾技能

main
戴面具的乐子人 2 years ago
commit 332daf4355

@ -1 +1 @@
RPGMV 1.6.1
RPGMV 1.6.2

@ -14,8 +14,8 @@ null,
{"id":12,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":410},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":412},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":3,"skillId":417}],"battlerHue":358,"battlerName":"海蜇2","dropItems":[{"kind":1,"dataId":26,"denominator":20},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":10,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0},{"code":11,"dataId":5,"value":1.1},{"code":11,"dataId":7,"value":0.9},{"code":11,"dataId":4,"value":0.9},{"code":11,"dataId":14,"value":0.8},{"code":11,"dataId":16,"value":1.1}],"gold":12,"name":"潜渊海蜇","note":"","params":[260,100,30,19,36,20,35,10]},
{"id":13,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":410},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":435}],"battlerHue":29,"battlerName":"蛇","dropItems":[{"kind":0,"dataId":0,"denominator":50},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":8,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0},{"code":11,"dataId":5,"value":1.1},{"code":11,"dataId":7,"value":0.9},{"code":11,"dataId":4,"value":0.9},{"code":11,"dataId":14,"value":0.95},{"code":11,"dataId":16,"value":1.1}],"gold":6,"name":"海蛇","note":"","params":[220,0,30,22,1,20,22,10]},
{"id":14,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":4,"skillId":412},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":4,"skillId":418},{"conditionParam1":0.7,"conditionParam2":1,"conditionType":2,"rating":5,"skillId":415},{"conditionParam1":0,"conditionParam2":0.5,"conditionType":2,"rating":4,"skillId":413},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":410},{"conditionParam1":0,"conditionParam2":0.8,"conditionType":2,"rating":3,"skillId":419},{"conditionParam1":0,"conditionParam2":0.6,"conditionType":2,"rating":4,"skillId":417},{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":414}],"battlerHue":52,"battlerName":"蝎子","dropItems":[{"kind":1,"dataId":61,"denominator":1},{"kind":1,"dataId":28,"denominator":1},{"dataId":1,"denominator":1,"kind":0}],"exp":80,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0},{"code":32,"dataId":58,"value":0.05},{"code":11,"dataId":16,"value":1.1},{"code":11,"dataId":5,"value":0.95},{"code":11,"dataId":7,"value":1.1},{"code":11,"dataId":4,"value":1.1}],"gold":500,"name":"熔岩巨蝎","note":"","params":[600,600,45,40,53,35,40,10]},
{"id":15,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":9,"skillId":439}],"battlerHue":0,"battlerName":"脑怪","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"被囚禁的脑怪","note":"","params":[99999,0,10,150,10,10,10,10]},
{"id":16,"actions":[],"battlerHue":0,"battlerName":"安洁莉娜·莉莉丝·刘","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"测试用的怪物","note":"","params":[1000,0,200,10,10,10,10,10]},
{"id":15,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":9,"skillId":439}],"battlerHue":0,"battlerName":"脑怪2","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"被囚禁的脑怪","note":"","params":[99999,0,10,150,10,10,10,10]},
{"id":16,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"安洁莉娜·莉莉丝·刘","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"测试用的怪物","note":"","params":[1000,0,200,10,10,10,10,10]},
{"id":17,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":267,"battlerName":"魔法师女4","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0},{"code":14,"dataId":188,"value":1}],"gold":0,"name":"海妖女王","note":"","params":[100,0,10,10,10,10,10,10]},
{"id":18,"actions":[],"battlerHue":0,"battlerName":"伪·五月","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0},{"code":22,"dataId":1,"value":10},{"code":22,"dataId":4,"value":10}],"gold":0,"name":"被控制的南宫五月","note":"","params":[100,2000,10,10,50,10,50,10]},
{"id":19,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"猎魔人领队","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"被控制的图坦因","note":"","params":[100,0,10,10,10,10,10,10]},

@ -10,7 +10,7 @@ null,
{"id":8,"expanded":true,"name":"通往皇宫的管道","order":12,"parentId":7,"scrollX":772,"scrollY":1253},
{"id":9,"expanded":true,"name":"共鸣腔及水循环通道","order":13,"parentId":8,"scrollX":1545,"scrollY":983},
{"id":10,"expanded":true,"name":"海底","order":9,"parentId":24,"scrollX":772,"scrollY":723},
{"id":11,"expanded":false,"name":"密室","order":14,"parentId":9,"scrollX":811,"scrollY":1204.5},
{"id":11,"expanded":false,"name":"密室","order":14,"parentId":9,"scrollX":811,"scrollY":1205.5},
{"id":12,"expanded":true,"name":"大护壁及大漩涡","order":18,"parentId":7,"scrollX":780,"scrollY":477},
{"id":13,"expanded":true,"name":"渡鸦12345的办公室1F","order":4,"parentId":30,"scrollX":925.8,"scrollY":627.6},
{"id":14,"expanded":true,"name":"梦位面宇宙","order":53,"parentId":0,"scrollX":1332.8571428571427,"scrollY":809.1428571428571},

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -0,0 +1,205 @@
/*:
@plugindesc 将ATB量规更改为一条线
@author うなぎおおとろ(twitter https://twitter.com/unagiootoro8388)
@param viewMode
@type string
@default wide
@desc
wideを設定すると横にラインを表示しますlongを設定すると縦にラインを表示します
@param useLineImage
@type boolean
@default false
@desc
trueを設定するとラインに画像を使用します
@param lineImageFileName
@type string
@default line
@desc
ラインに画像を使用する場合画像のファイル名を指定します
横方向の場合720, 32縦方向の場合32, 384の画像を使用してください
@param defaultEnemyIconFileName
@type number
@default Monster
@desc
敵キャラアイコンに使用するキャラクター画像のファイル名を指定します
@param defaultEnemyIconX
@type number
@default 7
@desc
敵キャラアイコンに使用する画像のX方向インデックスを指定します
@param defaultEnemyIconY
@type number
@default 4
@desc
敵キャラアイコンに使用する画像のY方向インデックスを指定します
@help
このプラグインはATB.jsの導入が必要です
ATBLine.jsATB.jsよりも後に入れてください
敵キャラのメモ欄に
<battlerIcon: ["角色图像文件名", X方向索引, Y方向索引]>
指定的话可以设定任意的敌人角色图标
<battlerIcon: ["Evil", 7, 4]
ライセンス
このプラグインはMITライセンスの条件の下で利用可能です
更新履歴
v1.0.0 新規作成
*/
{
const param = PluginManager.parameters("ATBLine");
const viewMode = param["viewMode"];
const useLineImage = (param["useLineImage"] === "true" ? true : false);
const lineImageFileName = param["lineImageFileName"];
const defaultEnemyIconFileName = param["defaultEnemyIconFileName"];
const defaultEnemyIconX = parseInt(param["defaultEnemyIconX"]);
const defaultEnemyIconY = parseInt(param["defaultEnemyIconY"]);
ATBConfig.drawEnemyUnderGauge = true;
ATBConfig.drawUnderGauge = true;
Game_Actor.prototype.battlerIconName = function() {
return this.characterName();
};
Game_Actor.prototype.characterBlockX = function() {
return this.characterIndex() % 4 * 3;
};
Game_Actor.prototype.characterBlockY = function() {
return Math.floor(this.characterIndex() / 4) * 4;
};
Game_Enemy.prototype.battlerIconName = function() {
if (!this.enemy().meta.battlerIcon) return defaultEnemyIconFileName;
return JSON.parse(this.enemy().meta.battlerIcon)[0];
};
Game_Enemy.prototype.characterBlockX = function() {
if (!this.enemy().meta.battlerIcon) return defaultEnemyIconX;
return JSON.parse(this.enemy().meta.battlerIcon)[1];
};
Game_Enemy.prototype.characterBlockY = function() {
if (!this.enemy().meta.battlerIcon) return defaultEnemyIconY;
return JSON.parse(this.enemy().meta.battlerIcon)[2];
};
class Sprite_ATBLine extends Sprite {
static get LINE_WIDTH() {
if (viewMode === "wide") {
return Graphics.width - 96;
} else {
return 32;
}
};
static get LINE_HEIGHT() {
if (viewMode === "wide") {
return 32;
} else {
return Graphics.height - 240;
}
};
initialize() {
const bitmap = this.createBitmap();
super.initialize(bitmap);
if (viewMode === "wide") {
this.x = 48;
this.y = 24;
} else {
this.x = Graphics.width - 48;
this.y = 24;
}
}
createBitmap() {
let bitmap;
if (useLineImage) {
bitmap = ImageManager.loadPicture(lineImageFileName);
} else {
bitmap = new Bitmap(Sprite_ATBLine.LINE_WIDTH, Sprite_ATBLine.LINE_HEIGHT);
if (viewMode === "wide") {
bitmap.fillRect(0, 8, Sprite_ATBLine.LINE_WIDTH, 8, "#000000");
} else {
bitmap.fillRect(8, 0, 8, Sprite_ATBLine.LINE_HEIGHT, "#000000");
}
}
return bitmap;
}
}
class Sprite_LineIcon extends Sprite {
static get BATTLER_ICON_WIDTH() { return 48 };
static get BATTLER_ICON_HEIGHT() {
if (viewMode === "wide") {
return Sprite_ATBLine.LINE_HEIGHT;
} else {
return 32;
}
};
initialize(gauge, x, y) {
this._gauge = gauge;
const bitmap = this.loadCharacterBitmap(gauge.battler());
super.initialize(bitmap);
this.setupBattlerIcon(gauge.battler(), gauge.purpose);
this._baseX = x;
this._baseY = y;
this.x = x;
this.y = y;
}
update() {
super.update();
this.updatePosition();
if (!this._gauge.isUsable()) this.visible = false;
}
updatePosition() {
if (viewMode === "wide") {
this.x = this._baseX + (this._gauge.value / 1000) * (Sprite_ATBLine.LINE_WIDTH - Sprite_LineIcon.BATTLER_ICON_WIDTH);
} else {
this.y = this._baseY - (this._gauge.value / 1000) * (Sprite_ATBLine.LINE_HEIGHT - Sprite_LineIcon.BATTLER_ICON_HEIGHT / 2);
}
}
loadCharacterBitmap(battler) {
return ImageManager.loadCharacter(battler.battlerIconName());
}
setupBattlerIcon(battler, gaugePurpose) {
const px = battler.characterBlockX() * 48;
const py = battler.characterBlockY() * 48;
this.setFrame(px, py, 48, 32);
}
}
/* class Spriteset_Battle */
const _Spriteset_Battle_initialize = Spriteset_Battle.prototype.initialize;
Spriteset_Battle.prototype.initialize = function() {
_Spriteset_Battle_initialize.call(this);
this._atbLine = new Sprite_ATBLine();
this._baseSprite.addChild(this._atbLine);
}
Spriteset_Battle.prototype.createGaugeLine = function(battler) {
if (viewMode === "wide") {
this._baseSprite.addChild(new Sprite_LineIcon(battler.gauge(), this._atbLine.x, this._atbLine.y - 8));
} else {
this._baseSprite.addChild(new Sprite_LineIcon(battler.gauge(), this._atbLine.x - 12, Sprite_ATBLine.LINE_HEIGHT));
}
};
};
Loading…
Cancel
Save