Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Buffs/Blind/Blind.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using LeagueSandbox.GameServer.API;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using GameServerCore.Enums;
using LeagueSandbox.GameServer.Scripting.CSharp;

namespace Blind
Expand All @@ -9,12 +10,12 @@ internal class Blind : IBuffGameScript
{
private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.BLIND);

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
unit.ApplyCrowdControl(_crowd);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveCrowdControl(_crowd);
}
Expand Down
9 changes: 5 additions & 4 deletions Buffs/Disarm/Disarm.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using LeagueSandbox.GameServer.API;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using GameServerCore.Enums;
using LeagueSandbox.GameServer.Scripting.CSharp;

namespace Disarm
Expand All @@ -9,12 +10,12 @@ internal class Disarm : IBuffGameScript
{
private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.DISARM);

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
unit.ApplyCrowdControl(_crowd);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveCrowdControl(_crowd);
}
Expand Down
10 changes: 5 additions & 5 deletions Buffs/HealCheck/HealCheck.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.Scripting.CSharp;

namespace HealCheck
{
internal class HealCheck : IBuffGameScript
{
private Buff _healBuff;
private IBuff _healBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_healBuff = AddBuffHudVisual("SummonerHealCheck", 35.0f, 1, BuffType.COMBAT_DEHANCER, unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
RemoveBuffHudVisual(_healBuff);
}
Expand Down
10 changes: 5 additions & 5 deletions Buffs/HealSpeed/HealSpeed.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -10,17 +10,17 @@ namespace HealSpeed
internal class HealSpeed : IBuffGameScript
{
private StatsModifier _statMod;
private Buff _healBuff;
private IBuff _healBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.MoveSpeed.PercentBonus = 0.3f;
unit.AddStatModifier(_statMod);
_healBuff = AddBuffHudVisual("SummonerHeal", 1.0f, 1, BuffType.COMBAT_ENCHANCER, unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveStatModifier(_statMod);
RemoveBuffHudVisual(_healBuff);
Expand Down
10 changes: 5 additions & 5 deletions Buffs/Highlander/Highlander.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GameServerCore.Enums;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -11,9 +11,9 @@ namespace Highlander
internal class Highlander : IBuffGameScript
{
private StatsModifier _statMod;
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus + (15f + ownerSpell.Level * 10) / 100f;
Expand All @@ -23,7 +23,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell)
//Immunity to slowness not added
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
RemoveBuffHudVisual(_visualBuff);
unit.RemoveStatModifier(_statMod);
Expand Down
9 changes: 5 additions & 4 deletions Buffs/Invulnerable/Invulnerable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using LeagueSandbox.GameServer.API;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using GameServerCore.Enums;
using LeagueSandbox.GameServer.Scripting.CSharp;

namespace Invulnerable
Expand All @@ -9,12 +10,12 @@ internal class Invulnerable : IBuffGameScript
{
private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.INVULNERABLE);

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
unit.ApplyCrowdControl(_crowd);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveCrowdControl(_crowd);
}
Expand Down
10 changes: 5 additions & 5 deletions Buffs/LuluR/LuluR.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -14,9 +14,9 @@ internal class LuluR : IBuffGameScript
private float _meantimeDamage;
private float _healthNow;
private float _healthBonus;
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.Size.PercentBonus = _statMod.Size.PercentBonus + 1;
Expand All @@ -29,7 +29,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell)
unit.AddStatModifier(_statMod);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
_healthNow = unit.Stats.CurrentHealth - _healthBonus;
_meantimeDamage = _healthBefore - _healthNow;
Expand Down
10 changes: 5 additions & 5 deletions Buffs/LuluWBuff/LuluWBuff.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -10,9 +10,9 @@ namespace LuluWBuff
internal class LuluWBuff : IBuffGameScript
{
private StatsModifier _statMod;
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
var ap = ownerSpell.Owner.Stats.AbilityPower.Total * 0.001;
_statMod = new StatsModifier();
Expand All @@ -23,7 +23,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell)
unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
RemoveBuffHudVisual(_visualBuff);
unit.RemoveStatModifier(_statMod);
Expand Down
10 changes: 5 additions & 5 deletions Buffs/LuluWDebuff/LuluWDebuff.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GameServerCore.Enums;
using LeagueSandbox.GameServer.API;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -13,9 +13,9 @@ internal class LuluWDebuff : IBuffGameScript
private UnitCrowdControl _crowdDisarm = new UnitCrowdControl(CrowdControlType.DISARM);
private UnitCrowdControl _crowdSilence = new UnitCrowdControl(CrowdControlType.SILENCE);
private StatsModifier _statMod;
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.MoveSpeed.BaseBonus = _statMod.MoveSpeed.BaseBonus - 60;
Expand All @@ -27,7 +27,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell)
unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveCrowdControl(_crowdDisarm);
unit.RemoveCrowdControl(_crowdSilence);
Expand Down
10 changes: 5 additions & 5 deletions Buffs/Overdrive/Overdrive.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -10,9 +10,9 @@ namespace Overdrive
internal class Overdrive : IBuffGameScript
{
private StatsModifier _statMod;
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus + (12f + ownerSpell.Level * 4) / 100f;
Expand All @@ -21,7 +21,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell)
_visualBuff = AddBuffHudVisual("Overdrive", 8.0f, 1, BuffType.COMBAT_ENCHANCER, unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
RemoveBuffHudVisual(_visualBuff);
unit.RemoveStatModifier(_statMod);
Expand Down
8 changes: 4 additions & 4 deletions Buffs/OverdriveSlow/OverdriveSlow.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -9,14 +9,14 @@ internal class OverdriveSlow : IBuffGameScript
{
private StatsModifier _statMod;

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod = new StatsModifier();
_statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus - 0.3f;
unit.AddStatModifier(_statMod);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveStatModifier(_statMod);
}
Expand Down
10 changes: 5 additions & 5 deletions Buffs/Quickdraw/Quickdraw.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameServerCore.Enums;
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using static LeagueSandbox.GameServer.API.ApiFunctionManager;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.GameObjects.Stats;
using LeagueSandbox.GameServer.Scripting.CSharp;

Expand All @@ -10,22 +10,22 @@ namespace Quickdraw
internal class Quickdraw : IBuffGameScript
{
private StatsModifier _statMod = new StatsModifier();
private Buff _visualBuff;
private IBuff _visualBuff;

public void OnUpdate(double diff)
{

}

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
_statMod.AttackSpeed.PercentBonus = 0.2f + (0.1f * ownerSpell.Level);
unit.AddStatModifier(_statMod);
_visualBuff = AddBuffHudVisual("GravesMoveSteroid", 4.0f, 1, BuffType.COMBAT_ENCHANCER,
unit);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
RemoveBuffHudVisual(_visualBuff);
unit.RemoveStatModifier(_statMod);
Expand Down
9 changes: 5 additions & 4 deletions Buffs/Silence/Silence.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using GameServerCore.Domain;
using GameServerCore.Domain.GameObjects;
using GameServerCore.Enums;
using LeagueSandbox.GameServer.API;
using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI;
using LeagueSandbox.GameServer.GameObjects.Spells;
using LeagueSandbox.GameServer.Scripting.CSharp;

namespace Silence
Expand All @@ -9,12 +10,12 @@ internal class Silence : IBuffGameScript
{
private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.SILENCE);

public void OnActivate(ObjAiBase unit, Spell ownerSpell)
public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
{
unit.ApplyCrowdControl(_crowd);
}

public void OnDeactivate(ObjAiBase unit)
public void OnDeactivate(IObjAiBase unit)
{
unit.RemoveCrowdControl(_crowd);
}
Expand Down
Loading