eastern-flames/eastern flames/scripts/combat/combat.gml

54 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2022-08-16 01:01:09 +00:00
function c_generatecombatstack(combatants=[]) {
log(combatants);
2022-08-23 10:09:17 +00:00
se_play(se_hurt);
2022-08-16 01:01:09 +00:00
//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) {
}