52 lines
1.7 KiB
JavaScript
52 lines
1.7 KiB
JavaScript
var FactoryManager = /** @class */ (function () {
|
|
function FactoryManager() {}
|
|
FactoryManager.prototype.onFactoryLevelUp = function (level) {
|
|
if (level == 1) {
|
|
this.addLevel1();
|
|
} else if (level == 2) {
|
|
this.addLevel2();
|
|
} else if (level == 3) {
|
|
this.addLevel3();
|
|
} else if (level == 4) {
|
|
this.addLevel4();
|
|
}
|
|
};
|
|
FactoryManager.prototype.addLevel1 = function () {
|
|
var f = $slg.formation();
|
|
f.addMember(187, 1);
|
|
f.addMember(188, 1);
|
|
f.addMember(189, 1);
|
|
f.addMember(190, 1);
|
|
f.addMember(191, 1);
|
|
f.setActor(0, f.findBattleActorByActorId(187));
|
|
f.setActor(1, f.findBattleActorByActorId(188));
|
|
f.setActor(2, f.findBattleActorByActorId(189));
|
|
f.setActor(3, f.findBattleActorByActorId(190));
|
|
f.setActor(4, f.findBattleActorByActorId(191));
|
|
};
|
|
FactoryManager.prototype.addLevel2 = function () {
|
|
var f = $slg.formation();
|
|
f.findBattleActorByActorId(187).levelUp();
|
|
f.findBattleActorByActorId(188).levelUp();
|
|
f.findBattleActorByActorId(189).levelUp();
|
|
f.findBattleActorByActorId(190).levelUp();
|
|
f.findBattleActorByActorId(191).levelUp();
|
|
};
|
|
FactoryManager.prototype.addLevel3 = function () {
|
|
var f = $slg.formation();
|
|
f.findBattleActorByActorId(187).levelUp();
|
|
f.findBattleActorByActorId(188).levelUp();
|
|
f.findBattleActorByActorId(189).levelUp();
|
|
f.findBattleActorByActorId(190).levelUp();
|
|
f.findBattleActorByActorId(191).levelUp();
|
|
};
|
|
FactoryManager.prototype.addLevel4 = function () {
|
|
var f = $slg.formation();
|
|
f.addMember(191, 1);
|
|
if (f.isEmpty(4)) {
|
|
f.setActor(4, f.findBattleActorByActorId(191));
|
|
}
|
|
};
|
|
return FactoryManager;
|
|
})();
|
|
var $factoryManager = new FactoryManager();
|