This commit is contained in:
the me 2022-08-15 18:01:09 -07:00
parent 0ead044da1
commit 51cc3f3ca6
20 changed files with 278 additions and 33 deletions

View file

@ -0,0 +1,53 @@
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) {
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "Scripts",
"path": "folders/Scripts.yy",
},
"resourceVersion": "1.0",
"name": "combat",
"tags": [],
"resourceType": "GMScript",
}