/*
-=Beastmaster=-
Stance 1: Lev 1 - Rampage: +05% Cooldown Reduction, +10% Damage, +05% Criticial Rate
Lev 2 - Rampage: +10% Cooldown Reduction, +15% Damage, +08% Criticial Rate
Lev 3 - Rampage: +15% Cooldown Reduction, +20% Damage, +11% criticial Rate
Lev 4 - Rampage: +25% Cooldown Reduction, +30% Damage, +14% criticial Rate
15% to Cause bleed effect and deal 50% of enemies current wounds*/
mob/proc
//Call this when changing Sub Attributes works well for buffs and debuffs
sub_stat_boost(var/Sub_attribute/sA = null, amt = null)
sA.boost += amt
mob/proc
activate_beastmaster_stance(var/path)
path = text2path(path)
var/ability/S = locate(path) in abilities
if(stance == "Rampage")
sub_stat_boost(critical_rate, amt = (S.level * 3) + 2)
sub_stat_boost(physical_damage, amt = (S.level * 5) + 5 + S.level > 3?5:0)
sub_stat_boost(spiritual_damage, amt = (S.level * 5) + 5 + S.level > 3?5:0)
sub_stat_boost(cooldowns_reduction, amt = S.level * 5 + S.level > 3?5:0)
Problem description: Alright so within the project, I have multiple stances and each stance increments a sub_attribute by a certain value. The value is dependent on the Rank/level of that Stance. I was wondering if I could give a Stance an associative list that holds what sub_attribute it will boost and by what value. Note, like I said before the value will change depending on the level of that stance. Then when I call the "activate_beastmaster_stance" proc, I could do something along the lines of.
mob/proc
activate_beastmaster_stance(var/path)
if(stance == "Rampage")
for(var/sub_attribute/s in rampage.list)
var/p = for(var/v in src.vars)
if(v == s) sub_stat_boost(v, amt = s.value)
//That's what I think should be done but I am not sure at all.