53 lines
1.0 KiB
Plaintext
53 lines
1.0 KiB
Plaintext
|
function c_generatecombatstack(combatants=[]) {
|
||
|
log(combatants);
|
||
|
//c_doallhook(hooks.precombat);
|
||
|
for (i=0; i<array_length(combatants); i++) {
|
||
|
c_resetbattlevar(combatants[i]);
|
||
|
}
|
||
|
//while combatants != [] {
|
||
|
log("whiling");
|
||
|
var i=0;
|
||
|
for (i=0; i<array_length(combatants); i++) {
|
||
|
//c_dodualhook(combatants[i], preaction);
|
||
|
tryaction(combatants[i], combatants[(i+1)%array_length(combatants)]);
|
||
|
//c_dodualhook(combatants[i], postaction);
|
||
|
}
|
||
|
//}
|
||
|
for (i=0; i<array_length(combatants); i++) {
|
||
|
c_resetbattlevar(combatants[i]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function c_recordaction(action) {
|
||
|
log(action);
|
||
|
}
|
||
|
|
||
|
function c_dodualhook(host, hook) {
|
||
|
|
||
|
}
|
||
|
function c_doallhook(hook) {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
function tryaction(me, them) {
|
||
|
//c_dodualhook(hooks.onstaminacheck);
|
||
|
while me.continuecombat(me, them) {
|
||
|
//action = defaultaction;
|
||
|
//c_dodualhook(hooks.prehit);
|
||
|
c_recordaction(me.action.effect(me, them));
|
||
|
//c_dodualhook(hooks.posthit);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*action {
|
||
|
effect: function() {
|
||
|
|
||
|
}
|
||
|
animation: new actionanim()
|
||
|
|
||
|
}*/
|
||
|
|
||
|
function insertaction(action, interruptable) {
|
||
|
|
||
|
}
|