wtf it works

This commit is contained in:
the me 2022-08-16 15:39:22 -07:00
parent 641ccd1065
commit aa747e8305
9 changed files with 48 additions and 14 deletions

View file

@ -0,0 +1,5 @@
function c_fulleval(target) {
c_modifierreset(target);
c_modeval(target, target.inventory[target.equippedweapon]);
c_modeval(target, c_gettile(target.pos.x, target.pos.y));
}

View file

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

View file

@ -3,4 +3,5 @@ function c_moveunit(targetunit, destination) {
array_push(destination.contents, targetunit);
targetunit.pos.x = destination.x;
targetunit.pos.y = destination.y;
}

View file

@ -13,6 +13,7 @@ function c_selectunit(unitobject) {
}
}
ARTICULATOR.selectedunit = unitobject;
c_fulleval(unitobject);
return unitobject;
}
@ -25,6 +26,7 @@ function c_deselectunit(unitobject) {
c_decolor_all(c_red);
c_decolor_all(c_green);
ARTICULATOR.selectedunit = noone;
c_fulleval(unitobject);
return true;
}

View file

@ -29,11 +29,7 @@ function c_addweapon(target, weapon_, equip=false) {
}
function c_equipweapon(target, weapon_) {
log(target.data.str.val);
c_modifierreset(target);
log(target.data.str.val);
c_wpeval(target, weapon_);
log(target.data.str.val);
c_fulleval(target);
}
nu weapon("nothing", "it's literally nothing", WPTYPE.NULL);
nu weapon("knife", "bleed, bleed", WPTYPE.SWORD, [new statmod(st.str, 20, add), new statmod(st.hit, 100, add)]);
@ -53,7 +49,7 @@ function c_modifierreset(target) {
}
}
function c_wpeval(target, weapon_) {
function c_modeval(target, weapon_) {
var lads = variable_struct_get_names(target.data);
var dudes = variable_struct_get_names(weapon_.modifiers);
var i;