forked from aaixy/rm-mvmz-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAXY_SingleImgSVActor.js
523 lines (471 loc) · 22.5 KB
/
AXY_SingleImgSVActor.js
1
2
3
4
5
6
7
8
9
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
//=============================================================================
// A XueYu Plugins - SingleImgSVActor
// AXY_SingleImgSVActor.js
// Version: 1.04
// License: MIT
//=============================================================================
/*:
* @plugindesc v1.04 Allows actors using single img in battle.
* @author A XueYu Plugins
*
* @help
* Introduction
* This plugin allows actors using single img in battle.
* Github: https://github.com/aaixy/rmmv-plugins
*
* Usage:
* set note use below this:
* <axysingle:axySingleImgSVActor1> //flag the actor use single battle img, It's necessary;
* <axysingle_scalex:0.8> //scale actor in x, It's not necessary. default is 1;
* <axysingle_scaley:0.8> //scale actor in y, It's not necessary. default is 1;
* <axysingle_rotation:0> //rotate death actor, It's not necessary. default is 0;
* <axysingle_hue:0> //hue actor in 0-360, It's not necessary. default is 0;
*
* It's not necessary below:
* <axysingle_death:axySingleImgSVActorDeath1> //flag the actor use single death img in battle, It's not necessary. default is your define above on single battle img;
* <axysingle_death_scalex:1> //scale death actor in x, It's not necessary. default is axysingle_scalex;
* <axysingle_death_scaley:1> //scale death actor in x, It's not necessary. default is axysingle_scaley;
* <axysingle_death_rotation:0> //rotate death actor, It's not necessary. default is axysingle_rotation;
* <axysingle_death_hue:50> //hue actor in 0-360, It's not necessary. default is axysingle_hue;
*
* <axysingle_damage:axySingleImgSVActorDamage1> //flag the actor use single damage img in battle, It's not necessary. default is your define above on single battle img;
* <axysingle_damage_scalex:1> //scale damage actor in x, It's not necessary. default is axysingle_scalex;
* <axysingle_damage_scaley:1> //scale damage actor in x, It's not necessary. default is axysingle_scaley;
* <axysingle_damage_rotation:0> //rotate damage actor, It's not necessary. default is axysingle_rotation;
* <axysingle_damage_hue:50> //hue actor in 0-360, It's not necessary. default is axysingle_hue;
*
* <axysingle_recovery:axySingleImgSVActorRecovery1> //flag the actor use single recovery img in battle, It's not necessary. default is your define above on single battle img;
* <axysingle_recovery_scalex:1> //scale recovery actor in x, It's not necessary. default is axysingle_scalex;
* <axysingle_recovery_scaley:1> //scale recovery actor in x, It's not necessary. default is axysingle_scaley;
* <axysingle_recovery_rotation:0> //rotate recovery actor, It's not necessary. default is axysingle_rotation;
* <axysingle_recovery_hue:50> //hue actor in 0-360, It's not necessary. default is axysingle_hue;
*
* coordinate:
* <axysingle_x:100>
* <axysingle_y:600>
*
* hp img, you can set hp1-99, for example:
* <axysingle_hp80:tank2svsingle2>
* <axysingle_hp60:tank2svsingle3>
* <axysingle_hp40:tank2svsingle4>
* <axysingle_hp20:tank2svsingle5>
*
* AXY.SingleImgSVActor.get('actor/class', actorId/classId);
* AXY.SingleImgSVActor.set('actor/class', actorId/classId, 'imgName');
* for example
* AXY.SingleImgSVActor.get('actor', 1);
* AXY.SingleImgSVActor.get('class', 1);
* AXY.SingleImgSVActor.set('actor', 1, 'img1');
* img1 was saved in img/sv_actors/img.png
*
* changelog
* 1.04 2019.11.25
* add: get and set function;
* add: different hp different img, this may cover axysingle_damage file;
* 1.03 2019.11.5
* add: class meta support, class meta has higher priority;
* fix: death image has no effect;
* 1.02 2019.10.31
* add: damage image support;
* add: recovery image support;
* add: main image rotation and hue support;
* change: License from BSD to MIT;
* 1.01 2017.9.6
* add death animation;
* 1.00 2017.9.5
* first release;
*/
// Imported
var Imported = Imported || {};
Imported.AXY_SingleImgSVActor = true;
// Parameter Variables
var AXY = AXY || {};
AXY.SingleImgSVActor = AXY.SingleImgSVActor || {};
AXY.SingleImgSVActor.Parameters = PluginManager.parameters('AXY_SingleImgSVActor');
AXY.SingleImgSVActor.Param = AXY.SingleImgSVActor.Param || {};
AXY.SingleImgSVActor.Alias = AXY.SingleImgSVActor.Alias || {};
AXY.SingleImgSVActor.Variables = AXY.SingleImgSVActor.Variables || {};
AXY.SingleImgSVActor.Param.SVActor = [];
AXY.SingleImgSVActor.Variables.hpArray = [];
// Main
AXY.SingleImgSVActor.get = function (type, id) {
switch (type) {
case 'actor':
return $gameActors.actor(id).actor().meta.axysingle;
case 'class':
return $gameActors.actor(id).currentClass().meta.axysingle;
/*case 'item':
return $dataItems[id].meta.quality;
case 'weapon':
return $dataWeapons[id].meta.quality;
case 'armor':
return $$dataArmors[id].meta.quality;
case 'enemy':
return $dataEnemies[id].meta.quality;*/
default:
return null;
}
};
AXY.SingleImgSVActor.set = function (type, id, value) {
switch (type) {
case 'actor':
$gameActors.actor(id).actor().meta.axysingle = value;
break;
case 'class':
$gameActors.actor(id).currentClass().meta.axysingle = value;
break;
/*case 'item':
$dataItems[id].meta.quality = value;
break;
case 'weapon':
$dataWeapons[id].meta.quality = value;
break;
case 'armor':
$$dataArmors[id].meta.quality = value;
break;
case 'enemy':
$dataEnemies[id].meta.quality = value;
break;*/
default:
return false;
}
return true;
};
Spriteset_Battle.prototype.createActors = function () {
this._actorSprites = [];
for (var i = 0; i < $gameParty.maxBattleMembers(); i++) {
var actorId = $gameParty._actors[i];
this._actorSprites[i] = new Sprite_Actor();
//console.log($gameParty);
//console.log(this);
if (actorId) {
//console.log($gameActors.actor(actorId));
//var name = $gameActors._data[actorId]._battlerName;
//console.log($gameActors._data[actorId]._battlerName);
//console.log($dataActors[actorId]);
var _metaClass = $gameActors.actor(actorId).currentClass().meta;
var _metaActor = $dataActors[actorId].meta;
var AXYSingleImgSVActorFileName = _metaActor.axysingle;
//console.log(isAXYSingleImgSVActor);
var AXYSingleImgSVActorScaleX = _metaClass.axysingle_scalex ? _metaClass.axysingle_scalex : _metaActor.axysingle_scalex;
var AXYSingleImgSVActorScaleY = _metaClass.axysingle_scaley ? _metaClass.axysingle_scaley : _metaActor.axysingle_scaley;
var AXYSingleImgSVActorRotation = _metaClass.axysingle_rotation ? _metaClass.axysingle_rotation : _metaActor.axysingle_rotation;
var AXYSingleImgSVActorHUE = _metaClass.axysingle_hue ? _metaClass.axysingle_hue : _metaActor.axysingle_hue ? _metaActor.axysingle_hue : 0;
//var AXYSingleImgSVActorX = _metaClass.axysingle_x ? _metaClass.axysingle_x : _metaActor.axysingle_x ? _metaActor.axysingle_x : 0;
//var AXYSingleImgSVActorY = _metaClass.axysingle_y ? _metaClass.axysingle_y : _metaActor.axysingle_y ? _metaActor.axysingle_y : 0;
if (AXYSingleImgSVActorFileName) {
//Delete last battle
//console.log(AXY.SingleImgSVActor.Param.SVActor[i]);
if (AXY.SingleImgSVActor.Param.SVActor[actorId]) {
delete AXY.SingleImgSVActor.Param.SVActor[actorId];
}
//create new
AXY.SingleImgSVActor.Param.SVActor[actorId] = new Sprite();
//console.log(AXY.SingleImgSVActor.Param.SVActor[i]);
AXY.SingleImgSVActor.Param.SVActor[actorId].bitmap = ImageManager.loadSvActor(AXYSingleImgSVActorFileName, AXYSingleImgSVActorHUE);
AXY.SingleImgSVActor.Param.SVActor[actorId].anchor.x = 0.5;
AXY.SingleImgSVActor.Param.SVActor[actorId].anchor.y = 1;
//initialize
if (AXY.SingleImgSVActor.Param.SVActor[actorId]) {
//tell whether a battler is a SingleImgSVActor
$gameActors.actor(actorId).isAXYSingleImgSVActor = true;
//set scale
if (AXYSingleImgSVActorScaleX) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.x = AXYSingleImgSVActorScaleX;
}
if (AXYSingleImgSVActorScaleY) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.y = AXYSingleImgSVActorScaleY;
}
if (AXYSingleImgSVActorRotation) {
AXY.SingleImgSVActor.Param.SVActor[actorId].rotation = AXYSingleImgSVActorRotation;
}
//console.log(this._actorSprites[i]);
this._actorSprites[i].addChild(AXY.SingleImgSVActor.Param.SVActor[actorId]);
//if (AXYSingleImgSVActorX && AXYSingleImgSVActorY) {
//this._actorSprites[i].setHome(parseInt(AXYSingleImgSVActorX), parseInt(AXYSingleImgSVActorY))
//}
}
}
//console.log(this._actorSprites[i]);
}
this._battleField.addChild(this._actorSprites[i]);
}
};
AXY.SingleImgSVActor.Alias.Sprite_Actor_prototype_setActorHome = Sprite_Actor.prototype.setActorHome;
Sprite_Actor.prototype.setActorHome = function (index) {
AXY.SingleImgSVActor.Alias.Sprite_Actor_prototype_setActorHome.call(this, index);
//console.log(this);
//AAAAA = this;
if (this._actor.isAXYSingleImgSVActor) {
var _metaClass = this._actor.currentClass().meta;
var _metaActor = this._actor.actor().meta;
var AXYSingleImgSVActorX = _metaClass.axysingle_x ? _metaClass.axysingle_x : _metaActor.axysingle_x ? _metaActor.axysingle_x : 0;
var AXYSingleImgSVActorY = _metaClass.axysingle_y ? _metaClass.axysingle_y : _metaActor.axysingle_y ? _metaActor.axysingle_y : 0;
if (AXYSingleImgSVActorX && AXYSingleImgSVActorY) {
this.setHome(parseInt(AXYSingleImgSVActorX), parseInt(AXYSingleImgSVActorY));
}
}
};
//Replace Actor default death animation
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performCollapse = Game_Actor.prototype.performCollapse;
Game_Actor.prototype.performCollapse = function () {
Game_Battler.prototype.performCollapse.call(this);
if ($gameParty.inBattle()) {
if (this.isAXYSingleImgSVActor === true) {
//console.log('isAXYSingleImgSVActor dead');
//console.log(this);
//console.log($gameParty);
//console.log($gameActors.actor(this._actorId));
//console.log(this);
//console.log(this.actor());
var actorId = this._actorId;
SoundManager.playActorCollapse();
//console.log(AXY.SingleImgSVActor.Param.SVActor[this._actorId]);
//var _metaClass = $gameActors.actor(actorId).currentClass().meta;
//var _metaActor = $dataActors[actorId].meta;
var _metaClass = this.currentClass().meta;
var _metaActor = this.actor().meta;
var AXYSingleImgSVActorFileName = _metaActor.axysingle_death ? _metaActor.axysingle_death : _metaActor.axysingle;
var AXYSingleImgSVActorScaleX = _metaClass.axysingle_death_scalex ? _metaClass.axysingle_death_scalex : _metaActor.axysingle_death_scalex ? _metaActor.axysingle_death_scalex : _metaActor.axysingle_scalex;
var AXYSingleImgSVActorScaleY = _metaClass.axysingle_death_scaley ? _metaClass.axysingle_death_scaley : _metaActor.axysingle_death_scaley ? _metaActor.axysingle_death_scaley : _metaActor.axysingle_scaley;
var AXYSingleImgSVActorRotation = _metaClass.axysingle_death_rotation ? _metaClass.axysingle_death_rotation : _metaActor.axysingle_death_rotation ? _metaActor.axysingle_death_rotation : _metaActor.axysingle_rotation;
var AXYSingleImgSVActorHUE = _metaClass.axysingle_death_hue ? _metaClass.axysingle_death_hue : _metaActor.axysingle_death_hue ? _metaActor.axysingle_death_hue : _metaActor.axysingle_hue;
if (AXYSingleImgSVActorScaleX) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.x = AXYSingleImgSVActorScaleX;
}
if (AXYSingleImgSVActorScaleY) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.y = AXYSingleImgSVActorScaleY;
}
if (AXYSingleImgSVActorRotation) {
AXY.SingleImgSVActor.Param.SVActor[actorId].rotation = AXYSingleImgSVActorRotation;
}
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.alpha = 0.5;
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.textColor = 'rgba(0,255,0,0)';
if (AXYSingleImgSVActorFileName) {
AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap = ImageManager.loadSvActor(AXYSingleImgSVActorFileName, AXYSingleImgSVActorHUE);
}
//this._actor.battlerHue();
//this.requestMotion('escape');
//this.addNewState(6);
//this.refresh();
//todo
//death animation
/*Sprite_Enemy.prototype.updateBitmap = function() {
Sprite_Battler.prototype.updateBitmap.call(this);
var name = this._enemy.battlerName();
var hue = this._enemy.battlerHue();
if (this._battlerName !== name || this._battlerHue !== hue) {
this._battlerName = name;
this._battlerHue = hue;
var huePlugins = hue + this._enemy.isElite() ? 100 : 0;
this.loadBitmap(name, huePlugins);
this.initVisibility();
}
if (Morpho_EliteEnemy_Plugins_Size == "true") {
this.scale.x = this._enemy.isElite() ? 1.2 : 1;
this.scale.y = this._enemy.isElite() ? 1.2 : 1;
}
};*/
} else {
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performCollapse.call(this);
}
}
};
//Replace Actor default Damage animation
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performDamage = Game_Actor.prototype.performDamage;
Game_Actor.prototype.performDamage = function () {
Game_Battler.prototype.performDamage.call(this);
if ($gameParty.inBattle()) {
if (this.isAXYSingleImgSVActor === true && this.isDead() !== true) {
//console.log('isAXYSingleImgSVActor dead');
//console.log(this);
//console.log($gameParty);
//console.log($gameActors.actor(this._actorId));
//console.log(this);
//console.log(this.actor());
var actorId = this._actorId;
SoundManager.playActorDamage();
//console.log(AXY.SingleImgSVActor.Param.SVActor[this._actorId]);
//var _metaClass = $gameActors.actor(actorId).currentClass().meta;
//var _metaActor = $dataActors[actorId].meta;
var _metaClass = this.currentClass().meta;
var _metaActor = this.actor().meta;
if (this.actor().note.contains('axysingle_hp')) {
AXY.SingleImgSVActor.Variables.hpArray = [];
for (var key in _metaActor) {
//if(arr.hasOwnProperty(key))
//console.log(key);
//console.log(_metaActor[key]);
if (key.contains('axysingle_hp')) {
AXY.SingleImgSVActor.Variables.hpArray.push({
hp: parseInt(key.replace('axysingle_hp', '')),
img: _metaActor[key]
});
}
}
//console.log(AXY.SingleImgSVActor.Variables.hpArray);
AXY.SingleImgSVActor.Variables.hpArray.sort(function (a, b) {
var value1 = a['hp'];
var value2 = b['hp'];
return value1 - value2;
})
//console.log(AXY.SingleImgSVActor.Variables.hpArray);
var _hpr = this._hp / this.mhp;
//console.log(_hpr + ', ' + this.mhp);
var _img = "";
for (var i = 0; i < AXY.SingleImgSVActor.Variables.hpArray.length; i++) {
if (_hpr * 100 < AXY.SingleImgSVActor.Variables.hpArray[i]['hp']) {
_img = AXY.SingleImgSVActor.Variables.hpArray[i]['img'];
break;
}
}
var AXYSingleImgSVActorFileName = _img;
} else {
var AXYSingleImgSVActorFileName = _metaActor.axysingle_damage ? _metaActor.axysingle_damage : _metaActor.axysingle;
var AXYSingleImgSVActorScaleX = _metaClass.axysingle_damage_scalex ? _metaClass.axysingle_damage_scalex : _metaActor.axysingle_damage_scalex ? _metaActor.axysingle_damage_scalex : _metaActor.axysingle_scalex;
var AXYSingleImgSVActorScaleY = _metaClass.axysingle_damage_scaley ? _metaClass.axysingle_damage_scaley : _metaActor.axysingle_damage_scaley ? _metaActor.axysingle_damage_scaley : _metaActor.axysingle_scaley;
var AXYSingleImgSVActorRotation = _metaClass.axysingle_damage_rotation ? _metaClass.axysingle_damage_rotation : _metaActor.axysingle_damage_rotation ? _metaActor.axysingle_damage_rotation : _metaActor.axysingle_rotation;
var AXYSingleImgSVActorHUE = _metaClass.axysingle_damage_hue ? _metaClass.axysingle_damage_hue : _metaActor.axysingle_damage_hue ? _metaActor.axysingle_damage_hue : _metaActor.axysingle_hue;
}
if (AXYSingleImgSVActorScaleX) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.x = AXYSingleImgSVActorScaleX;
}
if (AXYSingleImgSVActorScaleY) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.y = AXYSingleImgSVActorScaleY;
}
if (AXYSingleImgSVActorRotation) {
AXY.SingleImgSVActor.Param.SVActor[actorId].rotation = AXYSingleImgSVActorRotation;
}
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.alpha = 0.5;
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.textColor = 'rgba(0,255,0,0)';
if (AXYSingleImgSVActorFileName) {
AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap = ImageManager.loadSvActor(AXYSingleImgSVActorFileName, AXYSingleImgSVActorHUE);
}
//this._actor.battlerHue();
//this.requestMotion('escape');
//this.addNewState(6);
//this.refresh();
//todo
//death animation
/*Sprite_Enemy.prototype.updateBitmap = function() {
Sprite_Battler.prototype.updateBitmap.call(this);
var name = this._enemy.battlerName();
var hue = this._enemy.battlerHue();
if (this._battlerName !== name || this._battlerHue !== hue) {
this._battlerName = name;
this._battlerHue = hue;
var huePlugins = hue + this._enemy.isElite() ? 100 : 0;
this.loadBitmap(name, huePlugins);
this.initVisibility();
}
if (Morpho_EliteEnemy_Plugins_Size == "true") {
this.scale.x = this._enemy.isElite() ? 1.2 : 1;
this.scale.y = this._enemy.isElite() ? 1.2 : 1;
}
};*/
} else {
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performDamage.call(this);
}
}
};
/*Game_Battler.prototype.performRecovery = function () {
SoundManager.playRecovery();
};*/
//Replace Actor default Recovery animation
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performRecovery = Game_Actor.prototype.performRecovery;
Game_Actor.prototype.performRecovery = function () {
Game_Battler.prototype.performRecovery.call(this);
if ($gameParty.inBattle()) {
if (this.isAXYSingleImgSVActor === true && this.isDead() !== true) {
//console.log('isAXYSingleImgSVActor dead');
//console.log(this);
//console.log($gameParty);
//console.log($gameActors.actor(this._actorId));
var actorId = this._actorId;
SoundManager.playRecovery();
//console.log(AXY.SingleImgSVActor.Param.SVActor[this._actorId]);
//var _metaClass = $gameActors.actor(actorId).currentClass().meta;
//var _metaActor = $dataActors[actorId].meta;
var _metaClass = this.currentClass().meta;
var _metaActor = this.actor().meta;
if (this.actor().note.contains('axysingle_hp')) {
AXY.SingleImgSVActor.Variables.hpArray = [];
for (var key in _metaActor) {
//if(arr.hasOwnProperty(key))
//console.log(key);
//console.log(_metaActor[key]);
if (key.contains('axysingle_hp')) {
AXY.SingleImgSVActor.Variables.hpArray.push({
hp: parseInt(key.replace('axysingle_hp', '')),
img: _metaActor[key]
});
}
}
//console.log(AXY.SingleImgSVActor.Variables.hpArray);
AXY.SingleImgSVActor.Variables.hpArray.sort(function (a, b) {
var value1 = a['hp'];
var value2 = b['hp'];
return value1 - value2;
})
//console.log(AXY.SingleImgSVActor.Variables.hpArray);
var _hpr = this._hp / this.mhp;
var _img = "";
if (_hpr * 100 > AXY.SingleImgSVActor.Variables.hpArray[AXY.SingleImgSVActor.Variables.hpArray.length - 1]['hp']) {
_img = _metaActor.axysingle;
} else {
for (var i = 0; i < AXY.SingleImgSVActor.Variables.hpArray.length; i++) {
if (_hpr * 100 < AXY.SingleImgSVActor.Variables.hpArray[i]['hp']) {
_img = AXY.SingleImgSVActor.Variables.hpArray[i]['img'];
break;
}
}
}
var AXYSingleImgSVActorFileName = _img;
} else {
var AXYSingleImgSVActorFileName = _metaActor.axysingle_recovery ? _metaActor.axysingle_recovery : _metaActor.axysingle;
var AXYSingleImgSVActorScaleX = _metaClass.axysingle_recovery_scalex ? _metaClass.axysingle_recovery_scalex : _metaActor.axysingle_recovery_scalex ? _metaActor.axysingle_recovery_scalex : _metaActor.axysingle_scalex;
var AXYSingleImgSVActorScaleY = _metaClass.axysingle_recovery_scaley ? _metaClass.axysingle_recovery_scaley : _metaActor.axysingle_recovery_scaley ? _metaActor.axysingle_recovery_scaley : _metaActor.axysingle_scaley;
var AXYSingleImgSVActorRotation = _metaClass.axysingle_recovery_rotation ? _metaClass.axysingle_recovery_rotation : _metaActor.axysingle_recovery_rotation ? _metaActor.axysingle_recovery_rotation : _metaActor.axysingle_rotation;
var AXYSingleImgSVActorHUE = _metaClass.axysingle_recovery_hue ? _metaClass.axysingle_recovery_hue : _metaActor.axysingle_recovery_hue ? _metaActor.axysingle_recovery_hue : _metaActor.axysingle_hue;
}
if (AXYSingleImgSVActorScaleX) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.x = AXYSingleImgSVActorScaleX;
}
if (AXYSingleImgSVActorScaleY) {
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.y = AXYSingleImgSVActorScaleY;
}
if (AXYSingleImgSVActorRotation) {
AXY.SingleImgSVActor.Param.SVActor[actorId].rotation = AXYSingleImgSVActorRotation;
}
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.alpha = 0.5;
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.textColor = 'rgba(0,255,0,0)';
if (AXYSingleImgSVActorFileName) {
AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap = ImageManager.loadSvActor(AXYSingleImgSVActorFileName, AXYSingleImgSVActorHUE);
}
//this._actor.battlerHue();
//this.requestMotion('escape');
//this.addNewState(6);
//this.refresh();
//todo
//death animation
/*Sprite_Enemy.prototype.updateBitmap = function() {
Sprite_Battler.prototype.updateBitmap.call(this);
var name = this._enemy.battlerName();
var hue = this._enemy.battlerHue();
if (this._battlerName !== name || this._battlerHue !== hue) {
this._battlerName = name;
this._battlerHue = hue;
var huePlugins = hue + this._enemy.isElite() ? 100 : 0;
this.loadBitmap(name, huePlugins);
this.initVisibility();
}
if (Morpho_EliteEnemy_Plugins_Size == "true") {
this.scale.x = this._enemy.isElite() ? 1.2 : 1;
this.scale.y = this._enemy.isElite() ? 1.2 : 1;
}
};*/
} else {
AXY.SingleImgSVActor.Alias.Game_Actor_prototype_performRecovery.call(this);
}
}
};