TerryCavanagh / diceydungeons.com

Dicey Dungeons
50 stars 7 forks source link

Overload gadget (double statuses) doesn't apply to newly added status effects, since it pulls from a fixed array of statuses to double #2054

Open ncrecc opened 4 years ago

ncrecc commented 4 years ago
var statuslist = [POISON|FIRE|SHOCK|ICE|WEAKEN|CURSE|BLIND|FURY|LOCK|SHIELD|REDUCE|DODGE|THORNS]; for(st in statuslist) { if(getstatus(st) > 0) { inflict(st| getstatus(st)); } if(getstatusself(st) > 0) { inflictself(st| getstatusself(st)); } }

There must be a more efficient way to do overload. Is there a list of enemy statuses stored anywhere the way there's a list of enemy equipment? Could iterate through that

ncrecc commented 4 years ago

[1:51 PM] Wisp:

Is there a list of enemy statuses stored anywhere the way there's a list of enemy equipment? Could iterate through that

[1:51 PM] Wisp: is there? [1:51 PM] Naga: what else would you do though [1:51 PM] Jackeea: iterate through self.status and target.status

ncrecc commented 4 years ago

This should work:

for(x in target.status){ if(x.type != ~disallowed statuses if any - jinx and bear transform most likely~) { inflict(x.type|x.value); } } for(x in self.status){ if(x.invisible == false && x.type != ~foo~) { inflictself(x.type|x.value); } } sfx(~_thinghappens~);

(adapted from jacke's stuff)