(() => {
//设置角色阵型的哈希,键为阵型ID,值为角色坐标
let Actor_Pos = {
//散开阵
0: [[595, 172],
[615, 228],
[635, 284],
[655, 340],
[675, 396]],
//鹤翼阵
1: [[675, 172],
[675, 228],
[721, 284],
[675, 340],
[675, 396]],
};
//初始化阵型id
const UncleJay_Formation_initialize = Game_Party.prototype.initialize
Game_Party.prototype.initialize = function() {
UncleJay_Formation_initialize.call(this);
this._formation = 0;
};
//获取阵型id
Game_Party.prototype.formation = function() {
return this._formation;
};
//设置阵型id
Game_Party.prototype.setFormationID = function(num) {
this._formation = num;
};
//战斗画面下角色坐标的设置
Sprite_Actor.prototype.setActorHome = function(index) {
const id = $gameParty.formation();
const x = Actor_Pos[id][index][0];
const y = Actor_Pos[id][index][1];
this.setHome(x, y);
};
})();
(() => {
//设置角色阵型的哈希,键为阵型ID,值为角色坐标
let Actor_Pos = {
//散开阵
0: [[595, 172],
[615, 228],
[635, 284],
[655, 340],
[675, 396]],
//鹤翼阵
1: [[675, 172],
[675, 228],
[721, 284],
[675, 340],
[675, 396]],
};
//初始化阵型id
const UncleJay_Formation_initialize = Game_Party.prototype.initialize
Game_Party.prototype.initialize = function() {
UncleJay_Formation_initialize.call(this);
this._formation = 0;
};
//获取阵型id
Game_Party.prototype.formation = function() {
return this._formation;
};
//设置阵型id
Game_Party.prototype.setFormationID = function(num) {
this._formation = num;
};
//战斗画面下角色坐标的设置
Sprite_Actor.prototype.setActorHome = function(index) {
const id = $gameParty.formation();
const x = Actor_Pos[id][index][0];
const y = Actor_Pos[id][index][1];
this.setHome(x, y);
};
})();