MOD!
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
using CombatBuffBase = Continentis.MainGame.Character.CombatBuffBase;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public sealed class Basic_Hellfire : CombatBuffBase
|
||||
{
|
||||
public Basic_Hellfire(int stack)
|
||||
{
|
||||
Initialize(BuffType.Negative, BuffDispelLevel.Strong);
|
||||
|
||||
this.contentSubmodule = new ContentSubmodule(this)
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
|
||||
|
||||
this.iconSubmodule = new IconSubmodule(this);
|
||||
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
this.eventSubmodule.onAfterPlayCard.Add("Basic_Hellfire", new EventUnit<CardInstance, List<CharacterBase>>(OnAfterPlayCard));
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText("Hellfire", attachedCharacter.characterView);
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnAfterPlayCard(CardInstance card, List<CharacterBase> targets)
|
||||
{
|
||||
int reducedStack = Mathf.Max(1, Mathf.FloorToInt(unitedStackSubmodule.stackAmount * 0.2f));
|
||||
sourceCharacter.Attack(attachedCharacter, reducedStack, true);
|
||||
unitedStackSubmodule.ReduceStack(reducedStack);
|
||||
iconSubmodule.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85e166d56204f24408e8ac6cb869eaa4
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using UnityEngine;
|
||||
using CombatBuffBase = Continentis.MainGame.Character.CombatBuffBase;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public sealed class Basic_SoulAbsorption : CombatBuffBase
|
||||
{
|
||||
public Basic_SoulAbsorption(int stack)
|
||||
{
|
||||
Initialize(BuffType.Positive, BuffDispelLevel.Undispellable);
|
||||
|
||||
this.contentSubmodule = new ContentSubmodule(this)
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
|
||||
|
||||
this.iconSubmodule = new IconSubmodule(this);
|
||||
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
|
||||
this.generalAttributeSubmodule = new GeneralAttributeSubmodule(this);
|
||||
this.generalAttributeSubmodule.numericChange["LifeStealMultiplier"] = stack * 0.01f;
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText("Soul Absorption", attachedCharacter.characterView);
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
|
||||
existingBuff.generalAttributeSubmodule.numericChange["LifeStealMultiplier"] = existingBuff.unitedStackSubmodule.stackAmount * 0.01f;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5aac8e838505c8246a3ee95bb88a20ab
|
||||
Reference in New Issue
Block a user