eastern-flames/eastern flames/scripts/weapon/weapon.gml

28 lines
686 B
Plaintext
Raw Normal View History

2022-08-16 02:04:23 +00:00
global.weapons = {};
#macro wp global.weapons
function weapon(name_, description_, statmod_) constructor {
name = name_;
description = description_;
statmod = statmod_;
}
function c_addweapon(target, weapon_) {
array_push(target.inventory, deep_copy(weapon_));
}
function c_modifierreset(target) {
var dudes = variable_struct_get_names(target.data);
var lads = variable_struct_get_names(st);
var i;
for (i=0; i<array_length(dudes); i++) {
while !array_contains(lads, dudes[i]) || dudes[i] == "hp" {
array_delete(dudes, i, 1);
}
if i > array_length(dudes) break;
target.data[$dudes[i]].val = target.data[$dudes[i]].cap;
}
}
function c_wpeval(target, weapon_) {
}