Problem with instances of class

Certain “skills” in my game have buffs. When a Monster() attacks with a skill, an attack command is sent with the target’s Monster() instance and the attacker’s Monster() instance. Obviously, the damage is sent to the target and the buffs are sent to the attacker.

For some reason though, the buffs are added to the target and I have no idea why. Adding debug logs confuses me even further because it actually confirms that the buff is being sent to the attacker, not the target (or so I assume).

Here’s the script for the skill:

public class FistoftheBoar : Skill, IEffect
{	
	public FistoftheBoar()
	{
		Name = "Fist of the Boar";
		Desc = "An inaccurate attack capable of dealing devastating damage. Boosts attack for 3 turns.";
	}
	
	public void ApplyEffect(Monster target, Monster sender)
	{
		target.Damage(2, DamageType.Physical);
		sender.AddBuff(new SkillBuff("Fist of the Boar", BuffType.DMG, 2.0f, 3));
	}
}

And the script for the Monster class:

using UnityEngine;
using System.Collections.Generic;
using System.Linq;

public class Monster : MonoBehaviour
{
	public string Name = "Hercules";
	public int MaxHealth = 100;
	public TextMesh HealthIndicator;
	
	public Skill[] AvailableSkills = new Skill[3];
	
	private Dictionary<SkillBuff, int> _buffs = new Dictionary<SkillBuff, int>();
	private int _currentHealth;
	
	void Start()
	{
		_currentHealth = MaxHealth;
		HealthIndicator.text = _currentHealth + "/" + MaxHealth;
		
		AvailableSkills[0] = new CrushingBlow();
		AvailableSkills[1] = new VictorySlam();
		AvailableSkills[2] = new FistoftheBoar();
	}
	
	public void Damage(int amount, DamageType dmgType)
	{
		float modAmount = amount;
		SkillBuff[] dmgBuffs = SkillHelper.FindBuffs(_buffs.Keys.ToArray(), BuffType.DMG);
		foreach (SkillBuff dmgBuff in dmgBuffs)
		{
			modAmount *= dmgBuff.Modifier;
		}
		
		_currentHealth -= (int)modAmount;
		HealthIndicator.text = _currentHealth + "/" + MaxHealth;
		
		BattleManager.Instance.ShowDamage(transform.position, (int)modAmount);
	}
	
	public void AddBuff(SkillBuff buff)
	{
		if (_buffs.ContainsKey(buff)) _buffs[buff] = buff.TurnTime;
		else _buffs.Add(buff, buff.TurnTime);
	}
	
	public void Attack(Monster target, Skill skill = null)
	{
		if (skill == null) skill = AvailableSkills[Random.Range(0, AvailableSkills.Length)];
		if (skill is IEffect) ((IEffect)skill).ApplyEffect(target, this);
	}
	
	public void ModifyBuffTime(int amount, SkillBuff modBuff = null)
	{
		if (modBuff != null && _buffs.ContainsKey(modBuff)) _buffs[modBuff] += amount;
		else
		{
			SkillBuff[] currentBuffs = _buffs.Keys.ToArray();
			foreach (SkillBuff buff in currentBuffs)
			{
				_buffs[buff] += amount;
				if (_buffs[buff] <= 0) _buffs.Remove(buff);
			}
		}
	}
	
	public int GetHealth() { return _currentHealth; }
	public Dictionary<SkillBuff, int> GetBuffs() { return _buffs; }
}

I apologize that it’s uncommented, but hopefully someone could help me with this problem. It’s really frustrating and I have no idea what’s wrong.

Argh! I found the problem! On the Damage() method, the buffs were being taken from the target rather than the sender. So, if the monster1 attacked monster2, monster2’s buffs would affect the attack rather than monster1’s.