Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Fountain Enemy fix #1428

Open
wants to merge 1 commit into
base: indev
Choose a base branch
from
Open

Fountain Enemy fix #1428

wants to merge 1 commit into from

Conversation

17rma
Copy link

@17rma 17rma commented Apr 22, 2022

Fixed the issue where enemy champions can walk into your fountain without taking damage.

Copy link
Contributor

@lzardy lzardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes here are fairly odd and cannot be accepted.
The behavior of the Fountain Turret is one which should be scripted, not designed into the system.

@@ -1190,7 +1190,11 @@ public void AddBuff(IBuff b)
_game.PacketNotifier.NotifyNPC_BuffAdd2(b);
}
// Activate the buff for BuffScripts
b.ActivateBuff();
for(int i = 0; i < b.MaxStacks; ++i)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaxStacks is meant to be used inside each buff script for specific stacking behavior, and the only buffs which stack that should be activated multiple times are those with a BuffAddType of STACKS_AND_OVERLAPS (and that functionality is already implemented).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, in order to OnActivate get properly triggered multiple times, you have to give multiple calls or adding 1 stack.
OnActivate gets triggered only once regardless of how many buffs you're adding.
On other note, OnDeactivate also gets triggered only once regardless of many stacks the buff has.

Maybe we should have a few extra Functions in BuffScripts?

  • OnAddStack(int stacks)
  • OnRemoveStack(int stacks)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we have OnAllowAddBuff which should satisfy OnAddStack, but since we don't have an equivalent for OnRemoveStack it should be fine to add.

@@ -40,7 +40,7 @@ public void Update(float diff)
{
if (champion.Team != Team)
{
continue;
champion.Stats.CurrentHealth -= 5000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior of the Fountain Turret is one which should be scripted, not designed into the system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants