feat: apply relic passive effects (ATK/DEF boost, heal on kill, gold boost)
This commit is contained in:
@@ -82,6 +82,11 @@ func (p *Player) EffectiveATK() int {
|
||||
atk += item.Bonus
|
||||
}
|
||||
}
|
||||
for _, r := range p.Relics {
|
||||
if r.Effect == RelicATKBoost {
|
||||
atk += r.Value
|
||||
}
|
||||
}
|
||||
return atk
|
||||
}
|
||||
|
||||
@@ -92,5 +97,10 @@ func (p *Player) EffectiveDEF() int {
|
||||
def += item.Bonus
|
||||
}
|
||||
}
|
||||
for _, r := range p.Relics {
|
||||
if r.Effect == RelicDEFBoost {
|
||||
def += r.Value
|
||||
}
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user