public override int Proc(Armor armor, Character attacker, Character defender, int damage) { var level = Math.Max(0, armor.level); if (pdsharp.utils.Random.Int(4) != 0) { return(damage); } Buff.Prolong <Roots>(defender, 5 - level / 5); Buff.Affect <Earthroot.Armor>(defender).Level = 5 * (level + 1); CellEmitter.Bottom(defender.pos).Start(EarthParticle.Factory, 0.05f, 8); Camera.Main.Shake(1, 0.4f); return(damage); }
public override void Activate(Character ch) { base.Activate(ch); if (ch != null) { Buff.Affect <Armor>(ch).Level = ch.HT; } if (!Dungeon.Visible[Pos]) { return; } CellEmitter.Bottom(Pos).Start(effects.particles.EarthParticle.Factory, 0.05f, 8); Camera.Main.Shake(1, 0.4f); }