架构大更
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using Continentis.MainGame;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
@@ -13,33 +11,35 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
public FreedomOfMovement(int stack)
|
||||
{
|
||||
Initialize(BuffType.Positive, BuffDispelLevel.Basic);
|
||||
this.contentSubmodule = new ContentSubmodule(this)
|
||||
contentSubmodule = new ContentSubmodule(this)
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
|
||||
|
||||
this.iconSubmodule = new IconSubmodule(this);
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
iconSubmodule = new IconSubmodule(this);
|
||||
unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
this.eventSubmodule.onBeforePlayCard.Add("FreedomOfMovement", new PrioritizedAction<CardInstance, List<CharacterBase>>(OnBeforePlayCard));
|
||||
eventSubmodule = new EventSubmodule(this);
|
||||
eventSubmodule.onBeforePlayCard.Add("FreedomOfMovement",
|
||||
new PrioritizedAction<CardInstance, List<CharacterBase>>(OnBeforePlayCard));
|
||||
}
|
||||
|
||||
private void OnBeforePlayCard(CardInstance instance, List<CharacterBase> list)
|
||||
{
|
||||
if (instance.contentSubmodule.cardType == CardType.Power)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(this.attachedCharacter.deckSubmodule.DrawCards(unitedStackSubmodule.stackAmount));
|
||||
}
|
||||
CommandQueueManager.Instance.AddCommand(
|
||||
attachedCharacter.deckSubmodule.DrawCards(unitedStackSubmodule.stackAmount));
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText("Freedom Of Movement", attachedCharacter.characterView);
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText("Freedom Of Movement",
|
||||
attachedCharacter.characterView);
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
|
||||
existingBuff.unitedStackSubmodule.AddStack(unitedStackSubmodule.stackAmount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user