Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Created May 1, 2021
Embed
What would you like to do?
ATBS (MV)
/*
* Official Web Page
* <https://kagedesuworkshop.blogspot.ru/p/atbs.html>
*
* License
* Creative Commons 4.0 Attribution, Share Alike, Non-Commercial
* <https://creativecommons.org/licenses/by-nc-sa/4.0/>
*
* Copyright (c) 2018 Vladimir Skrypnikov (Pheonix KageDesu)
* <https://kagedesuworkshop.blogspot.ru/>
*
*/
//=============================================================================
// KageDesu_ATBS
//=============================================================================
//Version 1.0 (22.06.2018)
/*:
* @author Pheonix KageDesu
* @plugindesc v1.0.202 The active - time battle system
* @help https: //kagedesuworkshop.blogspot.ru/p/atbs.html
*
* @param KD ATBS
*
* @param Common Settings
* @param Controls
* @param Strings
* @param Animations
* @param Interface
*
* @param Controls_Key_W
* @parent Controls
* @text Top Circle Segment Key
* @type string
* @default w
*
* @param Controls_Key_D
* @parent Controls
* @text Right Circle Segment Key
* @type string
* @default d
*
* @param Controls_Key_S
* @parent Controls
* @text Down Circle Segment Key
* @type string
* @default s
*
* @param Controls_Key_A
* @parent Controls
* @text Left Circle Segment Key
* @type string
* @default a
*
* @param Controls_Key_E
* @parent Controls
* @text Menu Circle Binding Key
* @type string
* @default e
*
* @param Controls_Key_SP
* @parent Controls
* @text Help Key
* @type string
* @default space
*
* @param Common_AllowFB
* @parent Common Settings
* @text Allow Fast Battle?
* @type boolean
* @on Yes
* @off No
* @default true
*
* @param Common_Formula
* @parent Common Settings
* @text Formula for wait turn timer
* @type string
* @default ((def + mdf) / 2) / agi
* @desc Leave field empty for plugin default formula
*
* @param Common_Guard
* @parent Common Settings
* @text State for Guard Skill
* @type state
* @default 2
* @desc Default guard state (don't change this if you don't know what you do)
*
* @param Strings_Popup
* @parent Strings
* @text Popup
*
* @param STRING_POPUP_EVADE
* @parent Strings_Popup
* @type String
* @text Evade
* @default Evade
*
* @param STRING_POPUP_MISS
* @parent Strings_Popup
* @type String
* @text Miss
* @default Miss
*
* @param STRING_POPUP_FAIL
* @parent Strings_Popup
* @type String
* @text Fail
* @default Fail
*
* @param STRING_POPUP_ABSORB
* @parent Strings_Popup
* @type String
* @text Absorb
* @default Absorb
*
* @param STRING_POPUP_IMMUNE
* @parent Strings_Popup
* @type String
* @text Immune
* @default Immune
*
* @param STRING_POPUP_WEAK
* @parent Strings_Popup
* @type String
* @text Weak
* @default Weak
*
* @param STRING_POPUP_SKILL
* @parent Strings_Popup
* @type String
* @text Skill ready
* @default Ready!
*
* @param STRING_WAIT_TURN
* @parent Strings
* @type String
* @text Wait for turn
* @default Wait for turn
*
* @param STRING_TIMER_READY
* @parent Strings
* @type String
* @text Action
* @default Action!
*
* @param STRING_FAST_BATTLE
* @parent Strings
* @type String
* @text Fast battle
* @default Fast battle
*
* @param Animation_EnemyAttack
* @parent Animations
* @text Default Enemy Attack
* @type animation
* @default 6
* @desc This animation playing on Actor 's portrait when the Enemy hit with basic Attack
*
* @param Animation_EnemyMoving
* @parent Animations
* @text Enemy moving
* @type struct<EnemyInBattleAnimation>
* @desc Wiggle animation of the enemies in the battle
* @default {"PlayAnimation":"true","MoveStep":"2","MoveTime":"32"}
*
*
* @param Interface_Font
* @parent Interface
* @text Main Plugin Text Font
* @type string
* @default
* @desc Leave field empty for plugin default font
*/
/*~struct~EnemyInBattleAnimation:
* @param PlayAnimation
* @text Play?
* @type boolean
* @on Yes
* @off No
* @default true
*
* @param MoveStep
* @text Moving Step
* @type number
* @min 0
* @max 10
* @default 2
* @desc The percentage of the size of the image on which to move the image
*
* @param MoveTime
* @text Moving Time
* @type number
* @default 32
* @min 0
* @max 1000
* @desc Once in how many frames to move the picture
*/
//@[CODE STANDARD X1]
/* jshint -W097 */
/* jshint -W117 */
"use strict";
var Imported = Imported || {};
Imported.KDATBS = true;
var KD_ATBS = {};
KD_ATBS.Version = '1.0';
KD_ATBS.Build = 202;
KD_ATBS.Versions = {
'KD ATBS': KD_ATBS.Version + ' : ' + KD_ATBS.Build,
'CoffeeScript CLI': '2.3.1'
};
KD_ATBS.LIBS = {};
KD_ATBS.register = function (library) {
this.LIBS[library.name] = library;
};
//var DEV = DEV || {}; //! Comment this line on release
(function () {
var _SceneManager_catchException_ATBS = SceneManager.catchException;
SceneManager.catchException = function (e) {
SceneManager._printATBSInfo();
_SceneManager_catchException_ATBS.call(this, e);
};
SceneManager._printATBSInfo = function () {
console.error("Using KD ATBS [Version: " + KD_ATBS.Version + " ; Build: " + KD_ATBS.Build + " ; on MV " + Utils.RPGMAKER_VERSION + "]");
};
var _SceneManager_onError_ATBS = SceneManager.onError;
SceneManager.onError = function (e) {
SceneManager._printATBSInfo();
_SceneManager_onError_ATBS.call(this, e);
};
var _JsonEx_decode = JsonEx._decode;
JsonEx._decode = function (value, circular, registry) {
var type = Object.prototype.toString.call(value);
if (type === '[object Object]' || type === '[object Array]') {
if (value['@']) {
var constructor = KD_ATBS.LIBS[value['@']] || KDCore[value['@']];
if (constructor) {
value = this._resetPrototype(value, constructor.prototype);
value['@'] = null;
}
}
}
return _JsonEx_decode.call(this, value, circular, registry);
};
})();
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ KDCore.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
var KDCore;
KDCore = KDCore || {};
KDCore.Version = '1.0';
KDCore.LIBS = {};
KDCore.register = function(library) {
return this.LIBS[library.name] = library;
};
(function() {
var BitmapSrc, Color, DevLog, ParametersManager, SDK, StringsLoader;
//Array Extension
//------------------------------------------------------------------------------
Array.prototype.delete = function() {
var L, a, ax, what;
what = void 0;
a = arguments;
L = a.length;
ax = void 0;
while (L && this.length) {
what = a[--L];
while ((ax = this.indexOf(what)) !== -1) {
this.splice(ax, 1);
}
}
return this;
};
Array.prototype.include = function(value) {
return this.indexOf(value) !== -1;
};
Array.prototype.max = function() {
return Math.max.apply(null, this);
};
Array.prototype.min = function() {
return Math.min.apply(null, this);
};
Array.prototype.sample = function() {
if (this.length === 0) {
return [];
}
return this[SDK.rand(0, this.length - 1)];
};
Array.prototype.first = function() {
return this[0];
};
Array.prototype.last = function() {
return this[this.length - 1];
};
Array.prototype.shuffle = function() {
var k, n, v;
n = this.length;
while (n > 1) {
n--;
k = SDK.rand(0, n + 1);
v = this[k];
this[k] = this[n];
this[n] = v;
}
};
Array.prototype.count = function() {
return this.length;
};
//Number Extension
//------------------------------------------------------------------------------
Number.prototype.do = function(method) {
return SDK.times(this, method);
};
Number.prototype.clamp = function(min, max) {
return Math.min(Math.max(this, min), max);
};
//Sprite Extension
//------------------------------------------------------------------------------
Sprite.prototype.moveToCenter = function(dx = 0, dy = 0) {
return this.move(-this.bitmap.width / 2 + dx, -this.bitmap.height / 2 + dy);
};
Sprite.prototype.setStaticAnchor = function(floatX, floatY) {
this.x -= Math.round(this.width * floatX);
this.y -= Math.round(this.height * floatY);
};
Sprite.prototype.moveToParentCenter = function() {
if (!this.parent) {
return;
}
return this.move(this.parent.width / 2, this.parent.height / 2);
};
//Bitmap Extension
//------------------------------------------------------------------------------
Bitmap.prototype.fillAll = function(color) {
return this.fillRect(0, 0, this.width, this.height, color.CSS);
};
Bitmap.prototype.drawIcon = function(x, y, icon, size = 32) {
var bitmap;
bitmap = null;
if (icon instanceof Bitmap) {
bitmap = icon;
} else {
bitmap = BitmapSrc.LoadFromIconIndex(icon).bitmap;
}
return this.drawOnMe(bitmap, x, y, size, size);
};
Bitmap.prototype.drawOnMe = function(bitmap, x = 0, y = 0, sw = 0, sh = 0) {
if (sw <= 0) {
sw = bitmap.width;
}
if (sh <= 0) {
sh = bitmap.height;
}
this.blt(bitmap, 0, 0, bitmap.width, bitmap.height, x, y, sw, sh);
};
Bitmap.prototype.drawTextFull = function(text, position = 'center') {
return this.drawText(text, 0, 0, this.width, this.height, position);
};
//SDK
//------------------------------------------------------------------------------
SDK = function() {
throw new Error('This is a static class');
};
SDK.rand = function(min, max) {
return Math.round(Math.random() * (max - min)) + min;
};
SDK.setConstantToObject = function(object, constantName, constantValue) {
object[constantName] = constantValue;
if (typeof object[constantName] === 'object') {
Object.freeze(object[constantName]);
}
Object.defineProperty(object, constantName, {
writable: false
});
};
SDK.convertBitmapToBase64Data = function(bitmap) {
return bitmap._canvas.toDataURL('image/png');
};
SDK.times = function(times, method) {
var i, results;
i = 0;
results = [];
while (i < times) {
method(i);
results.push(i++);
}
return results;
};
SDK.toGlobalCoord = function(layer, coordSymbol = 'x') {
var node, t;
t = layer[coordSymbol];
node = layer;
while (node) {
t -= node[coordSymbol];
node = node.parent;
}
return (t * -1) + layer[coordSymbol];
};
SDK.isInt = function(n) {
return Number(n) === n && n % 1 === 0;
};
SDK.isFloat = function(n) {
return Number(n) === n && n % 1 !== 0;
};
//Color
//------------------------------------------------------------------------------
Color = class Color {
constructor(r1 = 255, g1 = 255, b1 = 255, a1 = 255) {
this.r = r1;
this.g = g1;
this.b = b1;
this.a = a1;
}
getLightestColor(lightLevel) {
var bf, newColor, p;
bf = 0.3 * this.R + 0.59 * this.G + 0.11 * this.B;
p = 0;
newColor = [0, 0, 0, 0];
if (bf - lightLevel >= 0) {
if (bf >= 0) {
p = Math.abs(bf - lightLevel) / lightLevel;
}
newColor = this.ARR.map(function(c) {
return c - (p * c);
});
} else {
if (bf >= 0) {
p = (lightLevel - bf) / (255 - bf);
}
newColor = this.ARR.map(function(c) {
return [(255 - c) * p + c, 255].min();
});
}
return new Color(newColor[0], newColor[1], newColor[2], newColor[3]);
}
clone() {
return this.reAlpha(this.a);
}
reAlpha(newAlpha) {
return new Color(this.r, this.g, this.b, newAlpha || 255);
}
static AddConstantColor(name, color) {
color.toHex();
color.toArray();
color.toCSS();
SDK.setConstantToObject(Color, name, color);
}
toHex() {
var b, g, r;
if (this._colorHex != null) {
return this._colorHex;
}
r = Math.floor(this.r).toString(16).padStart(2, "0");
g = Math.floor(this.g).toString(16).padStart(2, "0");
b = Math.floor(this.b).toString(16).padStart(2, "0");
return this._colorHex = '#' + r + g + b;
}
toArray() {
if (this._colorArray != null) {
return this._colorArray;
}
return this._colorArray = [this.r, this.g, this.b, this.a];
}
toCSS() {
var na, nb, ng, nr;
if (this._colorCss != null) {
return this._colorCss;
}
nr = Math.round(this.r);
ng = Math.round(this.g);
nb = Math.round(this.b);
na = this.a / 255;
return this._colorCss = `rgba(${nr},${ng},${nb},${na})`;
}
static Random() {
var a, b, c;
a = SDK.rand(1, 254);
b = SDK.rand(1, 254);
c = SDK.rand(1, 254);
return new Color(a, b, c, 255);
}
static FromHex(hexString) {
var color, result;
result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexString);
color = null;
if (result != null) {
color = {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
};
}
if (color != null) {
return new Color(color.r, color.g, color.b, 255);
} else {
return Color.NONE;
}
}
};
Object.defineProperties(Color.prototype, {
R: {
get: function() {
return this.r;
},
configurable: true
},
G: {
get: function() {
return this.g;
},
configurable: true
},
B: {
get: function() {
return this.b;
},
configurable: true
},
A: {
get: function() {
return this.a;
},
configurable: true
},
ARR: {
get: function() {
return this.toArray();
},
configurable: true
},
CSS: {
get: function() {
return this.toCSS();
},
configurable: true
},
HEX: {
get: function() {
return this.toHex();
},
configurable: true
}
});
Color.AddConstantColor('NONE', new Color(0, 0, 0, 0));
Color.AddConstantColor('BLACK', new Color(0, 0, 0, 255));
Color.AddConstantColor('WHITE', new Color(255, 255, 255, 255));
Color.AddConstantColor('RED', new Color(255, 0, 0, 255));
Color.AddConstantColor('GREEN', new Color(0, 255, 0, 255));
Color.AddConstantColor('BLUE', new Color(0, 0, 255, 255));
Color.AddConstantColor('AQUA', new Color(128, 255, 255, 255));
Color.AddConstantColor('MAGENTA', new Color(128, 0, 128, 255));
Color.AddConstantColor('YELLOW', new Color(255, 255, 0, 255));
Color.AddConstantColor('ORANGE', new Color(255, 128, 0, 255));
//DevLog
//------------------------------------------------------------------------------
DevLog = class DevLog {
constructor(prefix = "") {
this.prefix = prefix;
this._isShow = typeof DEV !== 'undefined';
this._color = Color.BLACK;
this._backColor = Color.WHITE;
}
on() {
this._isShow = true;
return this;
}
off() {
this._isShow = false;
return this;
}
applyRandomColors() {
this.applyRandomWithoutBackgroundColors();
this.setBackColor(Color.Random());
return this;
}
applyRandomWithoutBackgroundColors() {
this.setColor(Color.Random());
return this;
}
setColor(color) {
this._color = color;
return this;
}
setBackColor(backColor) {
this._backColor = backColor;
return this;
}
applyLibraryColors() {
this.setColors(new Color(22, 120, 138, 0), Color.WHITE);
return this;
}
setColors(color, backColor) {
this.setColor(color);
this.setBackColor(backColor);
return this;
}
applyWarningColors() {
this.setColors(Color.ORANGE, Color.BLACK.getLightestColor(100));
return this;
}
p(text) {
if (!this._isShow) {
return;
}
if (text == null) {
console.log("");
}
this._printText(text);
}
_printText(text) {
text = this.prefix + " : " + text;
if (this._isUsingColor()) {
return this._printTextWithColors(text);
} else {
return console.log(text);
}
}
_isUsingColor() {
return this._color !== Color.BLACK || this._backColor !== Color.WHITE;
}
_printTextWithColors(text) {
var args;
args = ['%c' + text, `color: ${this._color.HEX} ; background: ${this._backColor.HEX};`];
return window.console.log.apply(console, args);
}
static CreateForLib(library) {
var dlog;
dlog = new DevLog(library.name);
dlog.applyLibraryColors();
return dlog;
}
};
BitmapSrc = (function() {
//BitmapSrc
//------------------------------------------------------------------------------
class BitmapSrc {
constructor() {
this.bitmap = null;
}
static LoadFromIconIndex(iconIndex) {
var bs, icon_bitmap, iconset, ph, pw, sx, sy;
bs = new BitmapSrc();
if (BitmapSrc.CACHE[iconIndex] == null) {
iconset = ImageManager.loadSystem('IconSet');
pw = Window_Base._iconWidth;
ph = Window_Base._iconHeight;
sx = iconIndex % 16 * pw;
sy = Math.floor(iconIndex / 16) * ph;
icon_bitmap = new Bitmap(pw, ph);
icon_bitmap.addLoadListener(function() {
icon_bitmap.blt(iconset, sx, sy, pw, ph, 0, 0);
});
BitmapSrc.CACHE[iconIndex] = icon_bitmap;
}
bs.bitmap = BitmapSrc.CACHE[iconIndex];
return bs;
}
static LoadFromImageFolder(filename) {
var bs;
bs = new BitmapSrc();
bs.bitmap = ImageManager.loadPicture(filename);
return bs;
}
static LoadFromBase64(data, name) {
var bs;
bs = new BitmapSrc();
if (name != null) {
if (BitmapSrc.CACHE[name] != null) {
bs.bitmap = BitmapSrc.CACHE[name];
} else {
BitmapSrc.CACHE[name] = Bitmap.load(data);
bs.bitmap = BitmapSrc.CACHE[name];
}
} else {
bs.bitmap = Bitmap.load(data);
}
return bs;
}
static LoadFromMemory(symbol) {
var bs;
bs = new BitmapSrc();
if (BitmapSrc.CACHE[symbol] != null) {
bs.bitmap = BitmapSrc.CACHE[symbol];
} else {
bs.bitmap = ImageManager.loadEmptyBitmap();
}
return bs;
}
};
BitmapSrc.CACHE = {};
return BitmapSrc;
}).call(this);
//ParametersManager
//------------------------------------------------------------------------------
PluginManager.getPluginParametersByRoot = function(rootName) {
var pluginParameters, property;
for (property in this._parameters) {
if (this._parameters.hasOwnProperty(property)) {
pluginParameters = this._parameters[property];
if (PluginManager.isPluginParametersContentKey(pluginParameters, rootName)) {
return pluginParameters;
}
}
}
return PluginManager.parameters(rootName);
};
PluginManager.isPluginParametersContentKey = function(pluginParameters, key) {
return pluginParameters[key] !== void 0;
};
ParametersManager = class ParametersManager {
constructor(pluginName) {
this.pluginName = pluginName;
this._cache = {};
this._parameters = PluginManager.getPluginParametersByRoot(this.pluginName);
}
isLoaded() {
return (this._parameters != null) && this._parameters.hasOwnProperty(this.pluginName);
}
isHasParameter(name) {
return this._parameters[name] != null;
}
getString(name) {
return this._parameters[name];
}
convertField(object, fieldName) {
var e;
try {
object[fieldName] = JSON.parse(object[fieldName] || 'false');
} catch (error) {
e = error;
console.error('Error while convert field ' + e.name);
object[fieldName] = false;
}
return object;
}
convertImage(object, fieldName) {
return object[fieldName] = this.loadImage(object[fieldName]);
}
loadImage(filename, smooth) {
var path;
if (filename) {
path = filename.split('/');
filename = path.last();
path = path.first() + '/';
return ImageManager.loadBitmap('img/' + path, filename, 0, smooth || true);
} else {
return ImageManager.loadEmptyBitmap();
}
}
getFromCacheOrInit(name, func) {
var object;
if (!this.isInCache(name)) {
if (func != null) {
object = func.call(this);
this.putInCache(name, object);
}
}
return this.getFromCache(name);
}
isInCache(name) {
return this._cache.hasOwnProperty(name);
}
putInCache(name, object) {
return this._cache[name] = object;
}
getFromCache(name) {
return this._cache[name];
}
getNumber(name) {
var number;
number = this.getObject(name);
if (SDK.isInt(number)) {
return number;
}
return 0;
}
getObject(name) {
if (this.isHasParameter(name)) {
return JSON.parse(this.getString(name) || '{}');
} else {
return {};
}
}
getBoolean(name) {
if (this.isHasParameter(name)) {
return JSON.parse(this.getString(name) || false);
} else {
return false;
}
}
};
//StringsLoader
//------------------------------------------------------------------------------
StringsLoader = class StringsLoader {
constructor(_parameters) {
this._parameters = _parameters;
}
loadAllStringsToObject(object) {
var strings;
strings = this._collect(object);
this._writeNewString(object, strings);
}
_collect(object) {
var properties, strings;
properties = Object.getOwnPropertyNames(object);
strings = properties.filter(function(item) {
return item.includes("STRING_");
});
return strings;
}
_writeNewString(object, strings) {
var j, len, string;
for (j = 0, len = strings.length; j < len; j++) {
string = strings[j];
this._setStringFromPluginParametersToObject(object, string);
}
}
_setStringFromPluginParametersToObject(object, stringName) {
var newValue;
newValue = this._parameters[stringName];
if (newValue) {
object[stringName] = newValue;
}
}
};
//EXTENSION TO GLOBAL
//------------------------------------------------------------------------------
KDCore.SDK = SDK;
KDCore.Color = Color;
KDCore.DevLog = DevLog;
KDCore.BitmapSrc = BitmapSrc;
KDCore.ParametersManager = ParametersManager;
KDCore.StringsLoader = StringsLoader;
})();
// ■ END KDCore.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ ATBS_Input.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
(function() {
var IKey, alias_atbs_input_onKeyDown, alias_atbs_input_onKeyUp, i, j, k;
Input.KeyMapperPKD = {};
//Numbers
for (i = j = 48; j <= 57; i = ++j) {
Input.KeyMapperPKD[i] = String.fromCharCode(i);
}
//Letters
for (i = k = 65; k <= 90; i = ++k) {
Input.KeyMapperPKD[i] = String.fromCharCode(i).toLowerCase();
}
//[81, 87, 88, 90, 32] pageup, pagedown, escape, ok, ok
//GAMEPAD: W - Y, D - B, S - A, A - X
alias_atbs_input_onKeyDown = Input._onKeyDown;
Input._onKeyDown = function(event) {
alias_atbs_input_onKeyDown.call(this, event);
if (Input.keyMapper[event.keyCode]) {
return;
}
Input._setStateWithMapperPKD(event.keyCode);
};
Input._setStateWithMapperPKD = function(keyCode, state = true) {
var symbol;
symbol = Input.KeyMapperPKD[keyCode];
if (symbol != null) {
this._currentState[symbol] = state;
}
};
alias_atbs_input_onKeyUp = Input._onKeyUp;
Input._onKeyUp = function(event) {
alias_atbs_input_onKeyUp.call(this, event);
if (Input.keyMapper[event.keyCode]) {
return;
}
Input._setStateWithMapperPKD(event.keyCode, false);
};
Input.isCancel = function() {
if (Input.isGamepad()) {
return Input.isTriggered('pageup'); //LB
} else {
return Input.isTriggered('cancel') || TouchInput.isCancelled();
}
};
Input.isGamepad = function() {
var e;
try {
return navigator.getGamepads().item(0) != null;
} catch (error) {
e = error;
console.error(e);
return false;
}
};
IKey = function() {
throw new Error('This is a static class');
};
IKey.W = function() {
if (Input.isGamepad()) {
return 'menu';
} else {
return 'pagedown';
}
};
IKey.A = function() {
if (Input.isGamepad()) {
return 'cancel';
} else {
return 'a';
}
};
IKey.S = function() {
if (Input.isGamepad()) {
return 'ok';
} else {
return 's';
}
};
IKey.D = function() {
if (Input.isGamepad()) {
return 'shift';
} else {
return 'd';
}
};
IKey.SPACE = function() {
if (Input.isGamepad()) {
return 'pagedown';
} else {
return 'ok';
}
};
IKey.E = function() {
if (Input.isGamepad()) {
return 'pagedown';
} else {
return 'e';
}
};
IKey.getButtonImage = function(symbol, size) {
var e;
try {
if (Input.isGamepad()) {
return IKey.getGamepagButtonImage(symbol, size);
} else {
return IKey.getKeyboardButtonImage(symbol, size);
}
} catch (error) {
e = error;
console.error(e);
return ImageManager.loadEmptyBitmap();
}
};
IKey.getGamepagButtonImage = function(symbol, size) {
var keyBitmap, letter;
letter = IKey.getGamepadLetter(symbol);
keyBitmap = KDCore.BitmapSrc.LoadFromMemory("xbox" + letter).bitmap;
return IKey._createButtonBitmap(keyBitmap, size);
};
IKey._createButtonBitmap = function(srcBitmap, size) {
var bitmap;
bitmap = new Bitmap(size, size);
bitmap.drawOnMe(srcBitmap, 0, 0, size, size);
return bitmap;
};
IKey.getGamepadLetter = function(symbol) {
if (symbol === IKey.W()) {
return 'Y';
}
if (symbol === IKey.A()) {
return 'X';
}
if (symbol === IKey.S()) {
return 'A';
}
if (symbol === IKey.D()) {
return 'B';
}
return "";
};
IKey.getKeyboardButtonImage = function(symbol, size) {
var keyBitmap, newKeyBitmap;
if (symbol === IKey.W()) { //!TEMP
symbol = 'W';
}
keyBitmap = ATBS_ResourceManager.keyboardButton.bitmap;
newKeyBitmap = IKey._createButtonBitmap(keyBitmap, size);
IKey._drawSymbol(newKeyBitmap, symbol, size);
return newKeyBitmap;
};
IKey._drawSymbol = function(bitmap, symbol, size) {
if (bitmap.width <= 24) {
bitmap.fontSize = 16;
}
if (symbol != null) {
return bitmap.drawText(symbol.toUpperCase(), 0, 0, bitmap.width, bitmap.height - 4, 'center');
}
};
IKey.isTriggerW = function() {
return this._isTriggered(IKey.W());
};
IKey._isTriggered = function(iKey) {
return Input.isTriggered(iKey);
};
IKey.isTriggerD = function() {
return this._isTriggered(IKey.D());
};
IKey.isTriggerA = function() {
return this._isTriggered(IKey.A());
};
IKey.isTriggerS = function() {
return this._isTriggered(IKey.S());
};
KD_ATBS.register(IKey);
})();
// ■ END ATBS_Input.coffee
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ ATBS_System.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
KD_ATBS.SYSTEM = {};
(function ($) {
KDCore.SDK.setConstantToObject($, 'PLAYER_WINDOW_WIDTH', 260);
KDCore.SDK.setConstantToObject($, 'ALLY_WINDOW_WIDTH', 124);
KDCore.SDK.setConstantToObject($, 'PARTY_WINDOW_HEIGHT', 120);
KDCore.SDK.setConstantToObject($, 'MINIMUM_WAIT_TIME', 20);
KDCore.SDK.setConstantToObject($, 'WAIT_TIME_KOEF', 140);
KDCore.SDK.setConstantToObject($, 'FAST_BATTLE_TIME_KOEF', 0.2);
KDCore.SDK.setConstantToObject($, 'TURN_TIME', 180); //3 seconds
KDCore.SDK.setConstantToObject($, 'FORMULA', "((def + mdf) / 2) / agi");
$.FONT = 'VL-Gothic-Regular';
$.STRING_POPUP_EVADE = 'Evade';
$.STRING_POPUP_MISS = 'Miss';
$.STRING_POPUP_FAIL = 'Fail';
$.STRING_POPUP_ABSORB = 'Absorb';
$.STRING_POPUP_IMMUNE = 'Immune';
$.STRING_POPUP_WEAK = 'Weak';
$.STRING_POPUP_SKILL = 'Ready!';
$.STRING_WAIT_TURN = 'Wait for turn';
$.STRING_TIMER_READY = 'Action!';
$.STRING_FAST_BATTLE = "Fast battle";
})(KD_ATBS.SYSTEM);
var ATBS_ResourceManager = {};
ATBS_ResourceManager.iconAttackSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABtklEQVRIS2MMtLb+z4AE1h89yojMp5TNCLJg3ZEjYHMe/P3DUGTvwEBNSzAsAFlETUvAFvD6N8NDorHIFsymliXg8IZZoqwizHD3zluGhaWOYEuCbGwoDi54hIIsMSiexiAhJcZw9NB1qlmCkmJAlnj0rmEQF+NkuHjhIUNdoB7FPsFIkiBL4hdvBRtMDUuwpnlkS0AW+Svyk+0TnJkKZsnLV9/BQUauJXhzLSxOYGk4zVyCZJ8QLBaQIx7kG1ItIWgBLJ/AIh6XJe1u0f9PfX2AkW+IsgCXJbCMCDLcO1KU4dzBSwwbb/9EsYRoC7BZAsqQnzfWMsxtsWTYtPAcw/NnkgzoviDJApglIBpUfnEsLmRQlNRhSK+UZJjZ/hzDcJA6ki2ApShQ5JtxKzDcf36FIafIkaF+zmms5RZZFoDCHORqEHjy4A/D1uWvGSSlnmOEP1k+QI5QWJj7q7LDi3uKIhkWByADkSMUFFwwMZDPQL6CBRlZQQSrx5GrVpAYKDUJOnQzrJHRYlimIASOE7IswNYQAFnQmGLKcLNmJ4MO01+GKjlR6lqAnIRBbJjvqOYDXM0bAHuvBCiKpTEHAAAAAElFTkSuQmCC";
ATBS_ResourceManager.iconAttack = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconAttackSrc, 'icon_attack');
ATBS_ResourceManager.iconDefenseSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB50lEQVRIS5WVP0hCURTGP8e2oIxoMvoDzlYEIk1BDUHiUoik2GBtUXNDuBU5VUuSBRENJSSUEBH1FBwSJJAHYWA0ZlvYWJyn93Hf//vuolfvPb/7fefccz0QGOFg8I9fli+XPQLblCW2C1ngaDKJSCKBj0YDRycFvD1dQRRiAPCnZYHpJBScRr3VxnPhQRiiAVBwfdAXSUK9N4BarY2oT0aPP6CAGIS+26kxAK5LJazsPmJktE+1eXBoAMXbJuQvGXhvIb3ULwwyBezkXzU5JEDm9E75ze/1m4J+5SrOs1mDGmEFDKCB0KSraCIUwkY8LgbQK6A4F/dVjQJVCYD0JOAKoM8BJVjxvztYcPbpCpDJ5bCd/1RCsUTzAArKhj7px1vrzhat7h3iUvrWVJGZAhVSkVA8CIPKWSjJBKCKuGn5hBSkvE2MzUcsL5+hisZnIlhLLGhsslIgVyT1TpjZY9qL6DazPDjmwMEeW8DcvoSp4Y5NTIG+esiexVjMtgGaNjt9HsyqSMQey3att0mvgDay01tVD6sy0/eAAKRi86yK5dlOJ+UvGt/wrJJrC6A/eQjfFih4avrHtjT5Tmn5ovEAdYPL4EJPJrPK7ckdLWILmBI2d/NcOirgIbyvog++MEDzvLmc/AMHcaEo5rZH7QAAAABJRU5ErkJggg==";
ATBS_ResourceManager.iconDefense = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconDefenseSrc, 'icon_defense');
ATBS_ResourceManager.iconSkillsSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB40lEQVRIS2NkoDFgJMb8QGvr/9jUrT96lKB+vApABqdxJDJohhtjdcf1lWcZZv2Yz4DPIqwWoBsMMwjZFmSL8VmEYQHI8P74KWCzCLkQ3SGFC3MwfINiAcxwbC4GWYgcFOjxAvMRuiUoFmx3nvMfFN4gRUF1fQwmBqrwUDlz4TbDuqYiOB+fPLJD4BbAXA8zPMbNDCVib7x6D+aDLAJZrCEmiCE/Y9p6hkd75oHFYZbALYC5vv/pOYaMrEAMA0Caluw6hdVwmNyZY1ewWwByfa1pLcNC/qcMJlY6DOiuBxkA8gEh14P0du1JZ1A5xg33BdgHyBZQ4nqYBV3ncuD5A26BnEsS1VwPCo3m083geECxgBquBwUPVgtgyQ5b6sAV9qDgLWiYB/Y5ctjjtACUCmAA5ht8KQcU8aCkiWwBKMOJ68oggggUwaDwBwGQQhiAWQYSA6V7kEEwgCyG7npQMQMqCTz3poCDHx4Hd6y+YpSYTly5KIYiK0B2ACx4sBUXKDkZ2Xsgw2CWckrwgs3+/uIzQ5nLTBRf7vs2GZ7u0V0P9wFMByw/vLz8BJyOsQGQpTALYZaCUg5RhR0s0+ErrnGVoiC9BItrZJ9gq1CQfUR2hYNsCM2qTPSwp1mljzWWSRQEANKleiiGc7cZAAAAAElFTkSuQmCC";
ATBS_ResourceManager.iconSkills = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconSkillsSrc, 'icon_skills');
ATBS_ResourceManager.iconItemsSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABr0lEQVRIS7WWO0sDQRDHJz5Qm0RPRAgxENRCDAkq2qSwEGvRUvBL+Hn8DhIUO9EmjRDSKAgKgSgBiZ6vQiT4YFbmmJvb1xVuk3A7+//Nzvz39jLgObZrtR8eethoZHyWOoNIeGt+BJbXK5B9mILz61Oo33wqfRfICJDCMltfUALgEk4LigBphX1BCoDiWOPq3i4Mdi59eqeN+SqW1fq7VhsOmo+qPxFgf+dFLZoYqkC/vJEKhMI4uvUj6L29q/9oggTg+SP4g4yFXiCdMG3NCqAgE8gmnAqgA/FSdJ5eVUhxMhfrCT5vhaPxEmGTg7m+tcHh7TCQKAXqxHEuBiAnrc72ID9QMIIkgItzMImjbsxFuWATjs9OVHI6kA7AhVdKBVjMr8FV98Ju0+/stBakKxEmg8IzSyXl/2b7XiWY6AGeA2lTCcKFMmMpjGXTNpkDpHs4COeq4wuJjGU/rDuQVqLzgCAcvBT/blMJoPLg8+hVQTbFX9t5sJ0DKUxVsN4H8uCZbIr1poxleb1uNAJJgE3YuAOZAb+IyKY+wt4ACuRfFa6Lnifp/Kqwvv08Jn8Bs3BqKFe1v+gAAAAASUVORK5CYII=";
ATBS_ResourceManager.iconItems = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconItemsSrc, 'icon_items');
ATBS_ResourceManager.iconSetupSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAKeUlEQVRYR6WXC3BU1RnHf3cfyW42u3mw2TzZxJCHIYTwSoQQAggMpChgxwmIZpSOWBCVoqC0PggdW6miNIWKjzqtz1E0iloBeajIQ40gbxBiEhNJljyWZJPd7GZ3727nXHq3YKmdTs/MmXP37j3n+3/P8/+kmpoaTXt7u3bXrl1pnZ2d90uStECr1dq0Wi06nQ69Xq+s6rP6XqySJKHRaAiHw8oMhUIEg0FkWVaeA4FAZPr9fvFNN1Bnt9ufLisrc9hstqBUU1Ojq62trTSZTB/cdNNNzJkzB5PJpBykHiA2i6m+EwLEsyoYUICIKYCJGRUVpYAWq5hCEa/Xy44dO9i6davYf9O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KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconSetupSrc, 'icon_setup');
ATBS_ResourceManager.circleSegmentSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAAA2CAYAAAAGRjHZAAATIklEQVR4Xu1dCVRT57Y+5+RkJJCEJCSAaECRSRGVh5XWAbCTlNtqq7e2XQ99y0XtLRYHrPrQNri8RotDQTqgT+2V93Dg3YfVitXbClZFUQSFxoLIFEAkIWSAkDnnrZ1Lem3rACFqoTlrZQUW/9n/v/f+zh7+s/8Nioy8C+1niRgka+jOnTtp0dHRbKvVSrDZbEN9fb1RpVJZxo8fT8TFxVnvpScWi9GPP/6YQFF0sPMMcllPdrhDeE92VhfMlp6e7oFhGOf27duIXq9HmEymV2BgYNKdO3doKpWK0Ol0RoIgbBwOx0wmk3v0en0vQRB6g8Ggt1qtZhKJhFqtVhKKolQURb0QBAk3m80v6/X6yTiOW+h0uhrHcTmNRlOQyWR9b29vq8lkUpBIJDOLxaLyeDwhnU5vkclkh3U6nZ7FYqGRkZGk1tbWtj179phdwOJTIfG7B8SCBQtIRqORgeM4y9fX943GxkYPs9mMcjicP5vN5gkajQYhCAIhk8n2D4VCsX8cv8PfMAzT0mg0HEEQE47jegqFYkMQBEMQBACBoCiKW61WDEXRHhRFDRaLBTEajRiGYbjFYsGNRqMNRdEAq9WKmM1mxGQyIf1j7L/DzzAnm81GDAbDib6+vktcLpfK4XCq2traftDpdD2lpaWWp6LhQU76uwOEWCzG6urq+CqVajSHw/HX6/Xz1Wr1MxiGcalUqjcI3sPDA/H09LRxudx2Pp9f7uXlpedyuSQ+n28FpdDpdAcgUDKZfJdEIqlJJBKpXzYohmF2vjEMc5h7+AaQ2C+bzWb/OC6r1Wq1WCyjzWazB4ABQKDT6ZCuri5UoVBgKpXKqtVqhXK5fLpKpWL29vbarRaMNZlMLSQS6TabzT7c09NzlUqlNh4/frxnkHp6YsOfGiDgyY+IiCCkUimVRCJxmEzm6La2tj/p9fqFVC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wZA4efLkubm5uaeGTvmfFFwOiOvXr/tv3LixGkVRuUgkWpCTk/OjqxbrpvMvCYjFYvz69evzU1NTv58zZw68YHTJ5XJAEARB2bhxY6BcLm90ZVNul3DrJvJICfw/wQsbN6jEwPwAAAAASUVORK5CYII=";
ATBS_ResourceManager.circleSegment = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.circleSegmentSrc, 'circle_segment');
ATBS_ResourceManager.circleSegmentSmallSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAAiCAYAAAAaq1Q/AAAJF0lEQVRoQ+2ae1BT6RXAvxtuEhMSzINECI8AFiEwgEBdUqrAjhRHdFycAXVYpoqtqR10xLEiVv4AH1NwHHRVfERHZ8UKNoOiHe3aCpRYGLcr6ysBRiU8EqB5ESBPkpuk81HiuKxIgmhX9MxkMrn3fo/zu+d83/nOCQLeryBpaWleer0eycjIoEmlUrxSqbSHhYXZMQyzqdVq+9DQkBNOicFg4AMDA7nh4eFReDx+xGg0qlQq1Wh7e7shKCjIKzg42NnQ0KBMTEwEQqEQAwCMt3sfgrzDQRCBQIAqlUo/h8ORYDQaw+l0+i8AAAFeXl5jvr6+oSQSiUAgEBwoiuqIROIwDoczoihqBwB4IQhCslqtbIvFQnQ4HA4vLy+b3W4n2u12eB1nNpsdarX6GQCAZLPZXpjN5gdEIlFqMpn+vWzZMl1paanjXek2W9CQnJwcvMFgmEehUAJ1Ol0qhUJJZrFYQWw2e4Gfnx/G5XL7fH19TWw2e5BKpZrIZLKdTCY7cDgcDgBgBgCMwwIAwN9QYWg50IJeVZ4AACBjGOYwm804o9EIrXa+Wq32U6lU5N7e3kClUmlVKpU9Wq32rk6nuykWi/sn9fHWLN8GGlJQUBDc1dXFwePxv/f29k728/PTLFy40BkREaHmcrlKFoulptPp+gnl4WQhEDjm5HFd16dTCIKcbEHw2qvXCVqt1kelUnH6+vrwHR0dz168ePFco9HMNxgM3na7XRwVFaXw8fHpn6k1egSttLQUNzAwEKjR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YZ0ViURwzfiQBNmwYQPXYrFkxMbGblAoFMzs7OzPMjMzoeVNKx5Bg73V1dXxT58+vTssLOx3QqFwPFXyIcuaNWuoPB4vrKKiAiYn3BKPobnV6xx/6BO0GbzgT9CmgAaz2FMFuP8FxVbMzTKybOQAAAAASUVORK5CYII=";
ATBS_ResourceManager.circleSegmentSmall = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.circleSegmentSmallSrc, 'circle_segment_small');
ATBS_ResourceManager.keyboardButtonSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAKtUlEQVRYR61YaXMc1RU93bOv2mxJI3nRMmPLiwQYbGPZAUwRAkgx2JiQqnyBKsinfEmKsgGDcaUIFcMfyAdCEeIN8MJSlSKhSAoCBHCCF4ytWJa1jDT7Jo1mn55O3fu6R2NFghDcWnqb6T7v3HPPve9JAHDgwAHZbDdvKRayj5eK5U2SpFpVVVLo3sKbusBl/Zo0797887nbElRJBSRJkuJms/XPVrP9tT179gzTJ/hbv33phcdnZqZfMptMdZ0dXXDX1aGiKFBV7WXVZ9MBXZMh8V5/Qu2Bdv2a3byBaKeyLPMDwuEwJibHYTaZzzrc7kf3/HLPWengwec3TafTH7ucTtN9Az/GujXrIMkyVFQgqzJUib5KP/SMxUe/OLvijgqVn0GDZVyqOJZlCblcDp9+9ik++Ov7sFptX1iMtnukX//muRPFQmHXTx/+GdatXY98Po90OgmTyQzZYGROZUmCJMliDxmygdASaxI/mKFrmAXJFVQq4sV0THulUoFaUVGhaypFQ0KhWODvNzUuZfDv/ultfPLJx3C73I9Kz+x/KrJy+fKljzzyGJRKGcVCCdl8FpnZNIwmE0xGE4hyZk1nz0AgKQxEoly9rjNDdFSUCjOjqoQQUGhPwAiqoqBUKgCyjIb6JgbnsDsRCofw8su/g6JUDkn7nt0b613X27Rr10NITSd4ZE0NS5FOz0CtKMwck8+/ejjEsRYjQBUgqkpj0CxrDXxVDELVKlAsFeB21fOgA+Epe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A7r1nAIlEHMMjQ8jkMtiycSs6O7zXSPp6nlC2n/7yM4z7x9HU1IT1a3qRWdhgBxCLRjB05SJ3r94uH2tHUUqwWe1iKla7LbaGon9mwfsSN4nULlGZGxm7zK280+Hi7mJ2IcaoJPn945gMTKB3/QY4HU58fekCdxhmk0nMkmq3eX76X2wucp88zGq1ose7Fg6HCxcvX0A8HmPnz853/s6uLs8P77obwVCANbpyRQcy2VkMj1xm5zcYZCGT67BxEykBXSu8aG5uQTKVxPDIv7HatxpKScVb75wkizoq7T+wL+rt9i65447tvMhBFFvNFiRScUxMjkKWjVySqktS3wsc5aiKUqmI5iUtaGn2sK9lsxnY7Q7kczm88+7byGZzJ6RnD+wLt7e1NdNkRClXmCmaWo1NjiISDVUXVb4XnpovM7BiGS6XC10dPo5GqVRCc3MzQqEQjp94gxZVDtMy1NuKouzYMXg/etf3IRwN8wcpEQpay1PtY64LOolXe2gNrqW5ldt2i8XCc4z3/vIePv/8H3DaHY9JL774wtZ0ZvYjp8sl/+iuu9HevgzFcklbE/v/F+q+bQxUzCmM1B3LBhnnz5/Dhx99SLI543LId/GbDx58/hfpXOZFi9FiW7myA06XQzxXFZq43ptWD1i3dBxPxOD3+yEbDJfsTtcje3+19wsGRovDNptpe66Q/7miKH2QYJIglRdYX7quGFVuWUDrk2mDwfyBw2Z+5Yknnr5IL/kP6WJmGgbW+HoAAAAASUVORK5CYII=";
ATBS_ResourceManager.keyboardButton = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.keyboardButtonSrc,'keyboard_button');
ATBS_ResourceManager.xboxASrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAL/UlEQVRYR62YCXCc5XnHf9+1965W1n3LtmQkWZKFL8nYxgZDcEISYtIEp5kWk1BCw2QyUCCThraGxKRAE6AXznQgEMjECQGbJDTNkKaEy8axDcYGfEgGW7Jk61hpd6W9vqvzvmvJwpYFSfvN7Gi037fv+/ue4/88z6vwf7sWA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0om7iGFPkyfip3NnY3klFOxbYeTTa3sb4zT2JSULq9pGrH8MLWjSxkWCzLIr8nU5Q2QSnhhKuXIY4R01uWqFQfYc1g2IyK+rB7oGGew8Ryw8LKpBTy4eIREKcrTCYV0aXOuK1STTZtUUBwH2LaLK+/k/mdoIt6J8llYnSefydX5Kt3dtqy90pbHoocaZLQHHgO+NxDkXA2vOFeYNWdSlIe/NxKfqWJqCsUFPimZY+XSilRPUWRy6B+9PiDilRBKAhlqf8MrnuvosbnlwQbe2S8b3leBy85U51xgourbDMweOyzIyhsrmVoVltIHfRoFYR303MvEdWbuk32wsANh85ZHe8KWW23q8M4fu1i2ppFDTbLWexn4uzOhzmZjZ855REgs0satcwdz7ewY5TGf3DTB5DcU/GbutKfvC4VgtgPprCObjL4tPdycZvWbzTzxelPfOx4A7job1PmAiTnzRMoDYoVhne98pYjZF0SpGiKOoXT8hibFs53csYH83fWkuiIx1x9L8Zs9HbzwbpzOHhH35GnjNf/fY6i+DxJpa1nvVSRu1pQFmDgyxIjSAJGARl5IHLRAIiWM26bhZJqPDveIoNm3hji4WwGIo63PPf48l42dS2Fhe38rArFwDqDsXBN774ujzrdFQwX8by41nN/4omADVzUBUUKM7D0clkoCLYBQp6H3kvv3Rcf/AdmpDyTdqOCMAAAAAElFTkSuQmCC";
ATBS_ResourceManager.xboxA = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.xboxASrc, 'xboxA');
ATBS_ResourceManager.xboxB = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.xboxBSrc, 'xboxB');
ATBS_ResourceManager.xboxY = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.xboxYSrc, 'xboxY');
ATBS_ResourceManager.xboxX = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.xboxXSrc, 'xboxX');
ATBS_ResourceManager.iconBattleSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAACLUlEQVRIS51Wu0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qznMSLIFoNSVZKQCjgtkAIqXvQ2+DH7xRuAiHgTSpj0kzQJYsYJuCczw0Px4cBEPArA6hCQfwFwMS8Ign4AAusuRKyiyLED2CSzMt+zfBrbs9F1RlLKKIgv8VdnBEQoq4kGlMLrhIAspsgBUOYEMB4HHHxWwlrIUWWCq/JrhxZuvOA2nyAeweADR+MoiACv8FSgwp/ukAAAAAElFTkSuQmCC";
ATBS_ResourceManager.iconBattle = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconBattleSrc, 'icon_battle');
ATBS_ResourceManager.iconEscape = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconEscapeSrc, 'icon_escape');
ATBS_ResourceManager.iconFastBattle = KDCore.BitmapSrc.LoadFromBase64(ATBS_ResourceManager.iconFastBattleSrc, 'icon_fastBattle');
// ■ END ATBS_System.js
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ UI_LayerObject.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
(function() {
var UI_LayerObject;
//?[PARENT]
UI_LayerObject = class UI_LayerObject {
constructor(layer) {
this.layer = layer;
this._isVisible = true;
}
isVisible() {
return this._isVisible;
}
show() {
this._isVisible = true;
}
hide() {
this._isVisible = false;
}
terminate() {}
update() {}
move(x, y) {}
};
KD_ATBS.register(UI_LayerObject);
})();
// ■ END UI_LayerObject.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleManagerATBS.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
var BattleManagerATBS;
BattleManagerATBS = function() {
throw new Error('This is a static class');
};
BattleManagerATBS.init = function() {
this._isFastBattleAllowed = true;
this._isFastBattleExists = true;
if (KD_ATBS.Parameters.isLoaded()) {
this._isFastBattleExists = KD_ATBS.Parameters.getFastBattleMode();
}
this._initGuardState();
return this._initFormula();
};
BattleManagerATBS._initGuardState = function() {
var guardState, stateId;
stateId = 2;
if (KD_ATBS.Parameters.isLoaded()) {
stateId = KD_ATBS.Parameters.getGuardStateId();
if (stateId === 0) {
stateId = 2;
}
}
guardState = $dataStates[stateId];
if (guardState.iconIndex === 0) {
guardState.autoRemovalTiming = 1;
return guardState.iconIndex = 81;
}
};
BattleManagerATBS._initFormula = function() {
if (KD_ATBS.Parameters.isLoaded()) {
return this.FORMULA = KD_ATBS.Parameters.getWaitTimeFormula();
} else {
return this.FORMULA = KD_ATBS.Parameters.convertFormula(KD_ATBS.SYSTEM.FORMULA);
}
};
BattleManagerATBS.initBattle = function(scene) {
UIManagerATBS.init(scene);
$gameSystem.onBattleStart();
$gameParty.onBattleStart();
$gameTroop.onBattleStart();
this.battleProcess = new KD_ATBS.LIBS.BattleProcess();
this._phase = 'start';
this._fastBattleMode = false;
this._battleTurnTimer = new Game_TimerABS();
BattleManager.displayStartMessages();
return this.battleInput = new KD_ATBS.LIBS.InputBattle(scene);
};
BattleManagerATBS.isFastBattleMode = function() {
return this._fastBattleMode === true;
};
BattleManagerATBS.update = function() {
UIManagerATBS.update();
this.battleInput.update();
if (BattleManagerATBS.isBusy()) {
return this._updateWhenBusy();
} else {
return this._updateMain();
}
};
BattleManagerATBS.isBusy = function() {
return $gameMessage.isBusy();
};
BattleManagerATBS._updateWhenBusy = function() {
var ref;
this.hide();
return (ref = this.playerInput) != null ? ref.updateForWait() : void 0;
};
BattleManagerATBS._updateMain = function() {
if (!BattleManagerATBS.isBattleEnd()) {
UIManagerATBS.show();
}
this._updatePhases();
if (this.isBattle()) {
return this._updateInBattle();
} else {
if (!BattleManagerATBS.isBattleEnd()) {
return this._updateOnStart();
}
}
};
BattleManagerATBS._updatePhases = function() {
if (this._phase === 'start') {
this.battleProcess.processEvent();
}
if (this._phase === 'battle') {
this._updateBattlePhase();
}
if (this._phase === 'final') {
this._updateFinalPhase();
}
if (BattleManagerATBS.isBattleEnd()) {
return BattleManager.updateBattleEnd();
}
};
BattleManagerATBS._updateBattlePhase = function() {
var i, item, len, ref;
this._battleTurnTimer.update();
ref = this.getAllBattleMembers();
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
item.updateInBattle();
}
if (this.isTurnEnd()) {
return this._turnEnd();
}
};
BattleManagerATBS.getAllBattleMembers = function() {
return $gameParty.battleMembers().concat($gameTroop.members());
};
BattleManagerATBS.isTurnEnd = function() {
var ref;
return (ref = this._battleTurnTimer) != null ? ref.isReady() : void 0;
};
BattleManagerATBS._turnEnd = function() {
var i, item, len, ref;
ref = this.getAllBattleMembers();
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
item.onTurnEnd();
}
this.battleProcess.processEvent();
return this._turnStart();
};
BattleManagerATBS._turnStart = function() {
var turnTime;
turnTime = KD_ATBS.SYSTEM.TURN_TIME;
if (BattleManagerATBS.isFastBattleMode()) {
turnTime *= KD_ATBS.SYSTEM.FAST_BATTLE_TIME_KOEF;
}
this._battleTurnTimer.start(turnTime);
return $gameTroop.increaseTurn();
};
BattleManagerATBS._updateFinalPhase = function() {
return this._phase = 'battleEnd';
};
BattleManagerATBS._updateInBattle = function() {
this.battleProcess.processEvent();
this._processEnemy();
this._processPlayer();
this._processAlly();
return this.checkBattleEnd();
};
BattleManagerATBS._processEnemy = function() {
$gameTroop.members().forEach(function(member) {
return BattleManagerATBS._makeActionForBattler(member);
});
};
BattleManagerATBS._makeActionForBattler = function(battler) {
if (battler.isReadyForAction() && battler.isAlive()) {
battler.makeActions();
this.battleProcess.makeBattleAction(battler);
}
};
BattleManagerATBS._processPlayer = function() {
var player;
if (BattleManagerATBS.isFastBattleMode()) {
player = $gameParty.leader();
return BattleManagerATBS._makeActionForBattler(player);
} else {
return this.playerInput.update();
}
};
BattleManagerATBS._processAlly = function() {
$gameParty.battleMembers().forEach(function(member) {
if (!member.isPlayer()) {
return BattleManagerATBS._makeActionForBattler(member);
}
});
};
BattleManagerATBS.checkBattleEnd = function() {
if ((this._phase != null) && this._phase !== 'final') {
if ($gameParty.isEmpty()) {
this.abortBattle();
return true;
}
if ($gameParty.isAllDead()) {
this._onBattleEnd();
BattleManager.processDefeat();
return true;
}
if ($gameTroop.isAllDead()) {
this._onBattleEnd();
BattleManager.processVictory();
return true;
}
} else {
return false;
}
};
BattleManagerATBS.abortBattle = function() {
return BattleManager.abort();
};
BattleManagerATBS._onBattleEnd = function() {
this.hide();
this._fastBattleMode = false;
return this._phase = 'final';
};
BattleManagerATBS.hide = function() {
var ref;
UIManagerATBS.hide();
this.battleInput.hide();
return (ref = this.playerInput) != null ? ref.hide() : void 0;
};
BattleManagerATBS._updateOnStart = function() {
var ref;
if (!this.battleInput.isOpen()) {
return (ref = this.battleInput) != null ? ref.open() : void 0;
}
};
BattleManagerATBS.terminate = function() {
return UIManagerATBS.terminate();
};
BattleManagerATBS.canUseFastBattle = function() {
return this._isFastBattleAllowed === true && this._isFastBattleExists === true;
};
BattleManagerATBS.isBattle = function() {
return this._phase === 'battle';
};
BattleManagerATBS.isBattleEnd = function() {
return this._phase === 'battleEnd' || this._phase === 'final';
};
BattleManagerATBS.startBattle = function() {
this.playerInput = new KD_ATBS.LIBS.InputPlayer(this.battleInput.layer);
this.battleInput.setAnotherInput(this.playerInput);
UIManagerATBS.onBattleStart();
this._phase = 'battle';
this._turnStart();
return this.battleProcess.processEvent();
};
BattleManagerATBS.setFastBattleMode = function() {
var i, item, len, ref;
this._fastBattleMode = true;
ref = this.getAllBattleMembers();
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
item.setFastBattleMode();
}
};
BattleManagerATBS.isActionForced = function() {
return this.battleProcess.isActionForced();
};
BattleManagerATBS.setForceActionBattler = function(battler) {
return this.battleProcess.setForceActionBattler(battler);
};
BattleManagerATBS.activateBattleInput = function() {
var ref;
return (ref = this.battleInput) != null ? ref.activate() : void 0;
};
BattleManagerATBS.clickExternalTarget = function(battler) {
var ref;
return (ref = this.playerInput) != null ? ref.clickExternalTarget(battler) : void 0;
};
BattleManagerATBS.allowFastBattleMode = function(isAllowed) {
return this._isFastBattleAllowed = isAllowed;
};
// ■ END BattleManagerATBS.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleUIManager.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
var UIManagerATBS;
UIManagerATBS = function() {
throw new Error('This is a static class');
};
UIManagerATBS.init = function(scene) {
this.scene = scene;
this.spriteset = new Spriteset_Battle();
this.scene.addChild(this.spriteset);
this.layerManager = new KD_ATBS.LIBS.BattleLayers(this.scene); //spriteset!
this.interfaceManager = new KD_ATBS.LIBS.BattleInterfaces(this.layerManager);
return this._isHidden = false;
};
UIManagerATBS.onBattleStart = function() {
this.interfaceManager.onBattleStart();
return this.show();
};
UIManagerATBS.update = function() {
return this.interfaceManager.update();
};
UIManagerATBS.terminate = function() {
return this.interfaceManager.terminate();
};
UIManagerATBS.show = function() {
this.interfaceManager.show();
return this._isHidden = false;
};
UIManagerATBS.hide = function() {
this.interfaceManager.hide();
return this._isHidden = true;
};
UIManagerATBS.isHidden = function() {
return this._isHidden === true;
};
UIManagerATBS.getEnemySprite = function(enemy) {
return this.spriteset._enemySprites.find(function(sprite) {
return sprite._enemy === enemy;
});
};
UIManagerATBS.getActorSprite = function(actor) {
return this.spriteset._actorSprites.find(function(sprite) {
return sprite._actor === actor;
});
};
UIManagerATBS.selectEnemy = function(enemyIndex, iconIndex) {
if (this.interfaceManager != null) {
return this.interfaceManager.selectEnemy(enemyIndex, iconIndex);
}
};
UIManagerATBS.deselectAllEnemies = function() {
if (this.interfaceManager != null) {
return this.interfaceManager.deselectAllEnemies();
}
};
UIManagerATBS.onAnyBeenKiled = function(subject, target) {
if (this.interfaceManager != null) {
return this.interfaceManager.pushKillInfo(subject, target);
}
};
UIManagerATBS.onEnemyTransform = function(enemyIndex) {
var ref;
return (ref = this.interfaceManager) != null ? ref.onEnemyTransform(enemyIndex) : void 0;
};
// ■ END BattleUIManager.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ ParametersManagerATBS.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
var ParametersManagerATBS;
ParametersManagerATBS = class ParametersManagerATBS extends KDCore.ParametersManager {
constructor() {
super('KD ATBS');
}
getControlKeys() {
var keys;
keys = [];
keys[0] = this.getString('Controls_Key_W');
keys[1] = this.getString('Controls_Key_D');
keys[2] = this.getString('Controls_Key_S');
keys[3] = this.getString('Controls_Key_A');
keys[4] = this.getString('Controls_Key_SP');
keys[5] = this.getString('Controls_Key_E');
return keys;
}
loadAllStrings() {
var loader;
loader = new KDCore.StringsLoader(this._parameters);
return loader.loadAllStringsToObject(KD_ATBS.SYSTEM);
}
getWaitTimeFormula() {
var formula;
formula = this.getString('Common_Formula');
if (formula === "") {
formula = KD_ATBS.SYSTEM.FORMULA;
}
return this.convertFormula(formula);
}
convertFormula(formula) {
formula = formula.replace(/attackSpeed/i, 'this.attackSpeed()');
formula = formula.replace(/hp/i, 'this.hp');
formula = formula.replace(/mp/i, 'this.mp');
formula = formula.replace(/tp/i, 'this.tp');
formula = formula.replace(/mhp/i, 'this.mhp');
formula = formula.replace(/mmp/i, 'this.mmp');
formula = formula.replace(/atk/i, 'this.atk');
formula = formula.replace(/def/i, 'this.def');
formula = formula.replace(/mat/i, 'this.mat');
formula = formula.replace(/mdf/i, 'this.mdf');
formula = formula.replace(/agi/i, 'this.agi');
formula = formula.replace(/luk/i, 'this.luk');
return formula;
}
getFastBattleMode() {
return this._getBooleanFromCache('Common_AllowFB');
}
_getBooleanFromCache(name) {
return this.getFromCacheOrInit(name, function() {
var object;
object = this.getBoolean(name);
return object;
});
}
getGuardStateId() {
return this.getNumber('Common_Guard');
}
loadFont() {
var font;
font = this.getString('Interface_Font');
if (font !== "") {
return KD_ATBS.SYSTEM.FONT = font;
}
}
getEnemyAttackAnimId() {
return this._getNumberFromCache("Animation_EnemyAttack");
}
_getNumberFromCache(name) {
return this.getFromCacheOrInit(name, function() {
var object;
object = this.getNumber(name);
return object;
});
}
getEnemyMovingData() {
var name;
name = 'Animation_EnemyMoving';
return this.getFromCacheOrInit(name, function() {
var object;
object = this.getObject(name);
this.convertField(object, 'PlayAnimation');
this.convertField(object, 'MoveStep');
this.convertField(object, 'MoveTime');
return object;
});
}
};
// ■ END ParametersManagerATBS.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ ATBS_InputExtension.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
(function() {
var KEYS_GAME, KEYS_RAW, UNSAFE;
UNSAFE = ['q', 'w', 'x', 'z', 'space'];
KEYS_RAW = ['w', 'd', 's', 'a', 'space', 'e'];
KEYS_GAME = ['pagedown', 'd', 's', 'a', 'ok', 'e'];
//?[NEW]
KD_ATBS.LIBS.IKey.loadUserConfig = function() {
var i, j, ref;
if (!KD_ATBS.Parameters.isLoaded()) {
return;
}
KEYS_RAW = KD_ATBS.Parameters.getControlKeys();
for (i = j = 0, ref = KEYS_RAW.length; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) {
KEYS_GAME[i] = KD_ATBS.LIBS.IKey.convertUnsafeSymbols(KEYS_RAW[i]);
}
};
//?[NEW]
KD_ATBS.LIBS.IKey.convertUnsafeSymbols = function(symbol) {
symbol = symbol.toLowerCase();
if (!UNSAFE.includes(symbol)) {
return symbol;
}
if (symbol === 'q') {
return 'pageup';
}
if (symbol === 'w') {
return 'pagedown';
}
if (symbol === 'x') {
return 'escape';
}
if (symbol === 'z') {
return 'ok';
}
if (symbol === 'space') {
return 'ok';
}
};
//?[OVER]
KD_ATBS.LIBS.IKey.W = function() {
if (Input.isGamepad()) {
return 'menu';
} else {
return KEYS_GAME[0];
}
};
KD_ATBS.LIBS.IKey.D = function() {
if (Input.isGamepad()) {
return 'cancel';
} else {
return KEYS_GAME[1];
}
};
KD_ATBS.LIBS.IKey.S = function() {
if (Input.isGamepad()) {
return 'ok';
} else {
return KEYS_GAME[2];
}
};
KD_ATBS.LIBS.IKey.A = function() {
if (Input.isGamepad()) {
return 'shift';
} else {
return KEYS_GAME[3];
}
};
KD_ATBS.LIBS.IKey.SPACE = function() {
if (Input.isGamepad()) {
return 'pagedown';
} else {
return KEYS_GAME[4];
}
};
KD_ATBS.LIBS.IKey.E = function() {
if (Input.isGamepad()) {
return 'pagedown';
} else {
return KEYS_GAME[5];
}
};
//?[END OVER]
//?[OVER]
KD_ATBS.LIBS.IKey.getKeyboardButtonImage = function(symbol, size) {
var keyBitmap, newKeyBitmap;
symbol = KD_ATBS.LIBS.IKey.convertIKeyToLetter(symbol);
keyBitmap = ATBS_ResourceManager.keyboardButton.bitmap;
newKeyBitmap = KD_ATBS.LIBS.IKey._createButtonBitmap(keyBitmap, size);
KD_ATBS.LIBS.IKey._drawSymbol(newKeyBitmap, symbol, size);
return newKeyBitmap;
};
//?[NEW]
KD_ATBS.LIBS.IKey.convertIKeyToLetter = function(symbol) {
if (symbol === KD_ATBS.LIBS.IKey.W()) {
symbol = KEYS_RAW[0];
}
if (symbol === KD_ATBS.LIBS.IKey.D()) {
symbol = KEYS_RAW[1];
}
if (symbol === KD_ATBS.LIBS.IKey.S()) {
symbol = KEYS_RAW[2];
}
if (symbol === KD_ATBS.LIBS.IKey.A()) {
symbol = KEYS_RAW[3];
}
if (symbol === KD_ATBS.LIBS.IKey.SPACE()) {
symbol = KEYS_RAW[4];
}
if (symbol === KD_ATBS.LIBS.IKey.E()) {
symbol = KEYS_RAW[5];
}
return symbol;
};
})();
// ■ END ATBS_InputExtension.coffee
//---------------------------------------------------------------------------
// Generated by CoffeeScript 2.3.1
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleInterfaces.coffee
//╒═════════════════════════════════════════════════════════════════════════╛
//---------------------------------------------------------------------------
(function() {
var BattleInterfaces, UI_LayerObject;
UI_LayerObject = KD_ATBS.LIBS.UI_LayerObject;
BattleInterfaces = class BattleInterfaces extends UI_LayerObject {
constructor(layerManager) {
super(null);
this.layerManager = layerManager;
}
onBattleStart() {
this._createPartyInterface();
this._createTroopInterface();
return this._createBattleInterface();
}
_createPartyInterface() {
return this._party = new KD_ATBS.LIBS.PartyInterface(this.layerManager.getParty());
}
_createTroopInterface() {
return this._troop = new KD_ATBS.LIBS.TroopInterface(this.layerManager.getTroop());
}
_createBattleInterface() {
return this._battle = new KD_ATBS.LIBS.BattleInterface(this.layerManager.getBattleLog());
}
isCreated() {
return this._party != null;
}
selectEnemy(enemyIndex, iconIndex) {
if (this._troop != null) {
return this._troop.select(enemyIndex, iconIndex);
}
}
pushKillInfo(subject, target) {
return this._battle.pushKillInfo(subject, target);
}
deselectAllEnemies() {
if (this._troop != null) {
return this._troop.deselectAll();
}
}
onEnemyTransform(enemyIndex) {
var ref;
return (ref = this._troop) != null ? ref.onEnemyTransform(enemyIndex) : void 0;
}
show() {
return UI_LayerObject.prototype.show.call(this);
}
hide() {
if (!this.isCreated()) {
return;
}
UI_LayerObject.prototype.hide.call(this);
this._party.hide();
this._troop.hide();
return this._battle.hide();
}
update() {
if (!this.isCreated()) {
return;
}
if (!this.isVisible()) {
return;
}
this._party.update();
this._troop.update();
return this._battle.update();
}
terminate() {
if (!this.isCreated()) {
return;
}
this._party.terminate();
this._troop.terminate();
return this._battle.terminate();
}
};
KD_ATBS.register(BattleInterfaces);
})();
// ■ END BattleInterfaces.coffee
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleLog.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
(function () {
class BattleLog {
constructor() {
this._logWindow = new Window_BattleLog();
}
showAnimation(subject, targets, animationId) {
if (animationId < 0) {
this._show_attack_animation(subject, targets);
} else {
this._logWindow.showNormalAnimation(targets, animationId, false);
}
}
_show_attack_animation(subject, targets) {
if (subject.isEnemy()) {
SoundManager.playEnemyAttack();
}
this._logWindow.showActorAttackAnimation(subject, targets);
}
onActionResult(subject, target) {
if (target.result().used) {
this._on_damage(target);
this._on_failure(target);
if (target.result().isStatusAffected())
this._on_affected_status(target);
if (!target.isAlive()) {
UIManagerATBS.onAnyBeenKiled(subject, target);
}
}
}
onCounterAttack(target) {
target.performCounter();
}
onMagicReflection(target) {
target.performReflection();
}
onSubstitute(substitute, target) {
substitute.performSubstitute(target);
}
_on_damage(target) {
if (target.result().missed) {
if (target.result().physical) {
target.performMiss();
} else {
this._on_failure();
}
} else if (target.result().evaded) {
if (target.result().physical) {
target.performEvasion();
} else {
target.performMagicEvasion();
}
} else {
//HP
if (target.result().hpAffected) {
if (target.result().hpDamage > 0 && !target.result().drain) {
target.performDamage();
}
if (target.result().hpDamage < 0) {
target.performRecovery();
}
}
//MP
if (target.isAlive() && target.result().mpDamage !== 0) {
if (target.result().mpDamage < 0) {
target.performRecovery();
}
}
//TP
if (target.isAlive() && target.result().tpDamage !== 0) {
if (target.result().tpDamage < 0) {
target.performRecovery();
}
}
}
KD_ATBS.LIBS.PopInfoManagerABS.makeItemPopUp(target);
}
//?[EMPTY]
_on_failure(target) {}
_on_affected_status(target) {
let states = target.result().addedStateObjects();
states.forEach(function (state) {
var state_msg = target.isActor() ? state.message1 : state.message2;
if (state.id === target.deathStateId())
target.performCollapse();
this._add_state_info(target, state_msg);
}.bind(this));
}
//?[EMPTY]
_add_state_info(target, msg) {}
}
KD_ATBS.register(BattleLog);
})();
// ■ END BattleLog.js
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleManager.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
//?[OVER EMPTY]
BattleManager.startBattle = function () {};
//?[OVER]
BattleManager.isTurnEnd = function () {
return BattleManagerATBS.isTurnEnd();
};
//?[OVER]
BattleManager.abort = function () {
BattleManager.processAbort();
};
//?[OVER]
BattleManager.isActionForced = function () {
return BattleManagerATBS.isActionForced();
};
//?[OVER]
BattleManager.forceAction = function (battler) {
BattleManagerRTBS.getProcess().setForceActionBattler(battler);
};
var alias_BattleManager_processAbort_pkd = BattleManager.processAbort;
BattleManager.processAbort = function () {
BattleManagerATBS._onBattleEnd();
alias_BattleManager_processAbort_pkd.call(this);
};
//?[OVER EMPTY]
BattleManager.startTurn = function () {};
// ■ END BattleManager.js
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ BattleProcess.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
(function () {
class BattleProcess {
constructor() {
this._subject = null;
this._action = null;
this._forceAction = null;
this._log = new KD_ATBS.LIBS.BattleLog();
}
makeBattleAction(battler) {
this._subject = battler;
this._process_action();
}
_process_action() {
if (this._subject == null || !this._subject.currentAction()) {
return;
}
var action = this._subject.currentAction();
if (action) {
this._action = action;
action.prepare();
if (action.isValid()) {
this._start_action();
this._end_action();
}
this._subject.removeCurrentAction();
}
}
_start_action() {
if (!BattleManagerATBS.isFastBattleMode()) {
this._subject.requestEffect('whiten');
}
var targets = this._action.makeTargets();
this._subject.useItem(this._action.item());
this._action.applyGlobal();
if (!BattleManagerATBS.isFastBattleMode())
this._log.showAnimation(this._subject, targets, this._action.item().animationId);
targets.forEach(function (target) {
this._invoke_action(target, this._action);
}.bind(this));
}
_end_action() {
this._subject.performActionEnd();
this._subject.onAllActionsEnd();
BattleManagerATBS.checkBattleEnd();
this._subject.makeActions();
}
_invoke_action(target, action) {
if (Math.random() < action.itemCnt(target)) {
this.invokeCounterAttack(this._subject, target);
} else if (Math.random() < action.itemMrf(target)) {
this.invokeMagicReflection(this._subject, target);
} else {
this.invokeNormalAction(this._subject, target);
}
this._subject.setLastTarget(target);
}
invokeCounterAttack(subject, target) {
this._log.onCounterAttack(target);
var action = new Game_Action(target);
action.setAttack();
action.apply(subject);
this._log.onActionResult(subject, target);
}
invokeMagicReflection(subject, target) {
this._log.onMagicReflection(target);
this._action.apply(subject);
this._log.onActionResult(subject, target);
}
invokeNormalAction(subject, target) {
var realTarget = this.applySubstitute(target);
this._action.apply(realTarget);
this._log.onActionResult(subject, target);
}
applySubstitute(target) {
if (this.checkSubstitute(target)) {
var substitute = target.friendsUnit().substituteBattler();
if (substitute && target !== substitute) {
this._log.onSubstitute(substitute, target);
return substitute;
}
}
return target;
}
checkSubstitute(target) {
return target.isDying() && !this._action.isCertainHit();
}
isActionForced() {
return this._forceAction != null;
}
setForceActionBattler(battler) {
this._forceAction = battler;
}
processForcedAction() {
if (this.isActionForced()) {
var last_subject = this._subject;
this._subject = this._forceAction;
this._forceAction = null;
this._process_action();
this._subject = last_subject;
}
}
processEvent() {
this.processForcedAction();
$gameTroop.updateInterpreter();
if ($gameTroop.isEventRunning() || BattleManagerATBS.checkBattleEnd()) {
return;
}
$gameTroop.setupBattleEvent();
if ($gameTroop.isEventRunning() || SceneManager.isSceneChanging()) {
return;
}
}
}
KD_ATBS.register(BattleProcess);
})();
// ■ END BattleProcess.js
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ Game_Action.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
var pkd_GameAction_makeDamageValue = Game_Action.prototype.makeDamageValue;
Game_Action.prototype.makeDamageValue = function (target, critical) {
KD_ATBS.LIBS.PopInfoManagerABS.calcRate(this.calcElementRate(target));
return pkd_GameAction_makeDamageValue.call(this, target, critical);
};
var pkd_GameAction_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function (target, value) {
pkd_GameAction_executeDamage.call(this, target, value);
KD_ATBS.LIBS.PopInfoManagerABS.makeDamagePopUp(target);
if (this.isDrain()) {
KD_ATBS.LIBS.PopInfoManagerABS.makeDrainPopUp(this.subject());
}
};
var pkd_GameAction_itemEffectRecoverHp = Game_Action.prototype.itemEffectRecoverHp;
Game_Action.prototype.itemEffectRecoverHp = function (target, effect) {
pkd_GameAction_itemEffectRecoverHp.call(this, target, effect);
KD_ATBS.LIBS.PopInfoManagerABS.makeDamagePopUp(target);
};
var pkd_GameAction_itemEffectRecoverMp = Game_Action.prototype.itemEffectRecoverMp;
Game_Action.prototype.itemEffectRecoverMp = function (target, effect) {
pkd_GameAction_itemEffectRecoverMp.call(this, target, effect);
KD_ATBS.LIBS.PopInfoManagerABS.makeDamagePopUp(target);
};
var pkd_GameAction_itemEffectGainTp = Game_Action.prototype.itemEffectGainTp;
Game_Action.prototype.itemEffectGainTp = function (target, effect) {
pkd_GameAction_itemEffectGainTp.call(this, target, effect);
KD_ATBS.LIBS.PopInfoManagerABS.makeDamagePopUp(target);
};
var pkd_GameAction_executeHpDamage = Game_Action.prototype.executeHpDamage;
Game_Action.prototype.executeHpDamage = function (target, value) {
pkd_GameAction_executeHpDamage.call(this, target, value);
if (value == 0) {
KD_ATBS.LIBS.PopInfoManagerABS.makeZeroDamagePopUp(target);
}
};
// ■ END Game_Action.js
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//╒═════════════════════════════════════════════════════════════════════════╛
// ■ Game_Actor.js
//╒═════════════════════════════════════════════════════════════════════════╛
/////////////////////////////////////////////////////////////////////////////
var pkd_GameActor_initMembers = Game_Actor.prototype.initMembers;
Game_Actor.prototype.initMembers = function () {
pkd_GameActor_initMembers.call(this);
this._circleBattleSkillsIds = [0, 0, 0, 0]; //ID Навыков для круга
this._resetAtbsSkillMembers();
};
Game_Actor.prototype._resetAtbsSkillMembers = function () {
this._skillsIdAndTimersForRecharge = {}; //ID навыка -> таймер
this._circleBattleSkillsSet = null;
};
//?[OVER]
Game_Actor.prototype.isSpriteVisible = function () {
return true;
};
var pkd_GameActor_setup = Game_Actor.prototype.setup;
Game_Actor.prototype.setup = function (actorId) {
pkd_GameActor_setup.call(this, actorId);
this._waitMod = $dataActors[actorId].meta.WaitMod || 1;
};
//?[NEW]
Game_Actor.prototype.addBattleSkill = function (item, index) {
this._circleBattleSkillsSet = null;
try {
var sameIndex = this._getSameSkillIndex(item.id);
if (sameIndex == index) {
this._circleBattleSkillsIds[index] = 0;
} else {
if (sameIndex >= 0)
this._circleBattleSkillsIds[sameIndex] = 0;
this._circleBattleSkillsIds[index] = item.id;
}
} catch (e) {
console.error(e);
this._circleBattleSkillsIds[index] = 0;
}
};
Game_Actor.prototype._getSameSkillIndex = function (itemId = -1) {
return this._circleBattleSkillsIds.indexOf(itemId);
};
var pkd_GameActor_resetStateCounts = Game_Actor.prototype.resetStateCounts;
Game_Actor.prototype.resetStateCounts = function (stateId) {
pkd_GameActor_resetStateCounts.call(this, stateId);
if (this.isFastBattle())
this._stateSteps[stateId] *= KD_ATBS.SYSTEM.FAST_BATTLE_TIME_KOEF;
};
//?[NEW]
Game_Actor.prototype.getRechargeSkills = function () {
return this._skillsIdAndTimersForRecharge;
};
//?[NEW]
Game_Actor.prototype.getBattleItemsCount = function () {
return this.getBattleItems().length;
};
//?[NEW]
Game_Actor.prototype.hasItems = function () {
return $gameParty.hasBattleItems();
};
//?[NEW]
Game_Actor.prototype.hasSkills = function () {
return this._circleBattleSkillsIds.some((skill) => skill > 0);
};
//?[NEW]
Game_Actor.prototype.canUseSkills = function () {
if (this.hasSkills()) {
return this._circleBattleSkillsIds.some(((skillId) => this.canUse($dataSkills[skillId])).bind(this));
}
return false;
};
var pkd_GameActor_usableSkills = Game_Actor.prototype.usableSkills;
Game_Actor.prototype.usableSkills = function () {
if ($gameParty.inBattle()) {
var list = [];
this._circleBattleSkillsIds.forEach(function (skillId) {
if (skillId != 0)
list.push($dataSkills[skillId]);
}.bind(this));
return list.filter(function (skill) {
return this.canUse(skill);
}, this);
} else
return pkd_GameActor_usableSkills.call(this);
};
//?[NEW]
Game_Actor.prototype.isSkillReady = function (skill_id) {
var timer = this._skillsIdAndTimersForRecharge[skill_id];
if (timer)
return timer.isReady();
else
return true;
};
//?[NEW]
Game_Actor.prototype.startSkillRecharge = function (skill_id, koef = 1) {
if (skill_id == this.guardSkillId())
return;
var time = 0;
if (skill_id != this.attackSkillId()) {
time = Math.abs($dataSkills[skill_id].speed) * koef * 60;
}
this._skillsIdAndTimersForRecharge[skill_id] = new Game_TimerABS(time);
};
//?[NEW]
Game_Actor.prototype.getBattleSkills = function () {
if (this._circleBattleSkillsSet == null) {
this._collectBattleSkills();
}
return this._circleBattleSkillsSet;
};
Game_Actor.prototype._collectBattleSkills = function () {
this._circleBattleSkillsSet = [];
KDCore.SDK.times(4, function (i) {
if (this._circleBattleSkillsIds[i] > 0) {
this._circleBattleSkillsSet[i] = $dataSkills[this._circleBattleSkillsIds[i]];
} else {
this._circleBattleSkillsSet[i] = null;
}
}.bind(this));
};
//?[NEW]
Game_Actor.prototype.getBattleItems = function () {
return $gameParty.getBattleItems();
};
Game_Actor.prototype.meetsSkillConditions = function (skill) {
var base = Game_BattlerBase.prototype.meetsSkillConditions.call(this, skill);
if ($gameParty.inBattle())
return (base && this.isSkillReady(skill.id));
else return base;
};
Game_Actor.prototype.paySkillCost = function (skill) {
Game_BattlerBase.prototype.paySkillCost.call(this, skill);
if (skill.speed > 0)
this.startSkillRecharge(skill.id);
};
Game_Actor.prototype.onBattleStart = function () {
Game_Battler.prototype.onBattleStart.call(this);
this._circleBattleSkillsIds.forEach(function (id) {
if (id != 0) {
try {
var item = new Game_Item($dataSkills[id]);
if (item.isInitialReload())
this.startSkillRecharge(id, item.PrepareKoef || 1);
} catch (e) {
console.error(e);
}
}
}.bind(this));
};
Game_Actor.prototype.onBattleEnd = function () {
Game_Battler.prototype.onBattleEnd.call(this);
this._timer.reset();
this._resetAtbsSkillMembers();
};
//?[NEW]
Game_Actor.prototype.updateInBattle = function () {
Game_Battler.prototype.updateInBattle.call(this);
for (var key in this._skillsIdAndTimersForRecharge) {
if (this._skillsIdAndTimersForRecharge.hasOwnProperty(key)) {
var timer = this._skillsIdAndTimersForRecharge[key];
if (timer) {
timer.update();
if (timer.isReady()) {
KD_ATBS.LIBS.PopInfoManagerABS.makeSkillRechargePopUp(this, key);
delete this._skillsIdAndTimersForRecharge[key];
}
}
}
}
};
//?[OVER]
Game_Actor.prototype.isAutoBattle = function () {
if (this.isFastBattle() == true)
return true;
else
return !this.isPlayer();
};
//?[NEW OVER]
Game_Actor.prototype.isPlayer = function () {
return ($gameParty.leader() == this);
};
//?[OVER]
Game_Actor.prototype.performDamage = function () {
Game_Battler.prototype.performDamage.call(this);
if (this.isPlayer()) {
$gameScreen.startShake(5, 5, 10);
}
SoundManager.playActorDamage();
};
var pkd_GameActor_learnSkill = Game_Actor.prototype.learnSkill;
Game_Actor.prototype.learnSkill = function (skillId) {
pkd_GameActor_learnSkill.call(this, skillId);
var slot = this._getEmptySkillSlot();
if (slot != -1) {
this._circleBattleSkillsIds[slot] = skillId;
this._circleBattleSkillsSet = null;
}
};
Game_Actor.prototype._getEmptySkillSlot = function () {
return this._circleBattleSkillsIds.indexOf(0);
};
var pkd_GameActor_forgetSkill = Game_Actor.prototype.forgetSkill;