意图初步
This commit is contained in:
@@ -10,13 +10,13 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b6560183465e5944ba49e39974faafd4, type: 3}
|
||||
m_Name: CharacterData_Basic_MarshalOfTheUnderworld
|
||||
m_Name: CharacterData_Basic_MarshalOfUnderworld
|
||||
m_EditorClassIdentifier:
|
||||
haveCustomClass: 0
|
||||
classFullName:
|
||||
haveCustomClass: 1
|
||||
classFullName: MarshalOfUnderworld
|
||||
modName: Basic
|
||||
className: MarshalOfTheUnderworld
|
||||
displayName: Marshal Of The Underworld
|
||||
className: MarshalOfUnderworld
|
||||
displayName: Marshal Of Underworld
|
||||
tags: []
|
||||
avatar: {fileID: 21300000, guid: 8b60e98b9ca5e6a4587341cd27607e24, type: 3}
|
||||
portrait: {fileID: 0}
|
||||
@@ -144,7 +144,7 @@ MonoBehaviour:
|
||||
index: 20
|
||||
isKeyDuplicated: 0
|
||||
- Key: StaminaRecoverPerAction
|
||||
Value: 0
|
||||
Value: 4
|
||||
index: 21
|
||||
isKeyDuplicated: 0
|
||||
- Key: ManaRecoverPerAction
|
||||
@@ -192,6 +192,11 @@ MonoBehaviour:
|
||||
prefabRefs: []
|
||||
derivativeCardDataRefs: []
|
||||
derivativeCharacterDataRefs: []
|
||||
initialDeckRef: []
|
||||
initialDeckRef:
|
||||
- CardData_Basic_ArmyOfTheDead
|
||||
- CardData_Basic_GreatswordSweep
|
||||
- CardData_Basic_HellfireBlast
|
||||
- CardData_Basic_WrathOfUnderworld
|
||||
- CardData_Basic_NecromanticInfusion
|
||||
hudDataRefs:
|
||||
- HUDData_Basic_Default
|
||||
130
Assets/Mods/Basic/Characters/Scripts/MarshalOfUnderworld.cs
Normal file
130
Assets/Mods/Basic/Characters/Scripts/MarshalOfUnderworld.cs
Normal file
@@ -0,0 +1,130 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using Continentis.Mods.Basic.Cards;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Characters
|
||||
{
|
||||
public class MarshalOfUnderworld : CharacterLogicBase
|
||||
{
|
||||
public override void Initialize(CharacterBase character)
|
||||
{
|
||||
base.Initialize(character);
|
||||
character.RegisterIntention(
|
||||
new Normal(character.intentionSubmodule),
|
||||
new SummonFirst(character.intentionSubmodule),
|
||||
new UltimateAttackFirst(character.intentionSubmodule));
|
||||
}
|
||||
|
||||
private class Normal : IntentionBase
|
||||
{
|
||||
public Normal(IntentionSubmodule intentionSubmodule) : base(intentionSubmodule)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void RefreshCardWeights()
|
||||
{
|
||||
characterDeck.PoolPile.ForEach(card =>
|
||||
{
|
||||
card.cardLogic.weightSubmodule.baseWeight = 0;
|
||||
card.cardLogic.weightSubmodule.forceUse = false;
|
||||
card.cardLogic.weightSubmodule.forceIgnore = false;
|
||||
});
|
||||
|
||||
foreach (CardInstance card in characterDeck.PoolPile)
|
||||
{
|
||||
if (card.cardLogic is HellfireBlast)
|
||||
{
|
||||
card.cardLogic.weightSubmodule.baseWeight = 1;
|
||||
}
|
||||
else if (card.cardLogic is NecromanticInfusion)
|
||||
{
|
||||
if (characterRecord.GetLastActionsRecords(3)
|
||||
.Any(rec => rec.cardsPlayed.Any(recCard => recCard.cardLogic is NecromanticInfusion)))
|
||||
{
|
||||
card.cardLogic.weightSubmodule.baseWeight = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
card.cardLogic.weightSubmodule.baseWeight = 1;
|
||||
}
|
||||
}
|
||||
else if (card.cardLogic is GreatswordSweep)
|
||||
{
|
||||
card.cardLogic.weightSubmodule.baseWeight = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class SummonFirst : Normal
|
||||
{
|
||||
public SummonFirst(IntentionSubmodule intentionSubmodule) : base(intentionSubmodule)
|
||||
{
|
||||
Priority = 20;
|
||||
}
|
||||
|
||||
public override bool Condition()
|
||||
{
|
||||
List<CharacterBase> allies = CombatMainManager.Instance.characterController.GetAllAllies(character);
|
||||
return allies.Count == 1; // Only self is present
|
||||
}
|
||||
|
||||
public override void RefreshCardWeights()
|
||||
{
|
||||
base.RefreshCardWeights();
|
||||
|
||||
foreach (CardInstance card in characterDeck.PoolPile)
|
||||
{
|
||||
if (card.cardLogic is ArmyOfTheDead)
|
||||
{
|
||||
card.cardLogic.weightSubmodule.forceUse = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class UltimateAttackFirst : Normal
|
||||
{
|
||||
public UltimateAttackFirst(IntentionSubmodule intentionSubmodule) : base(intentionSubmodule)
|
||||
{
|
||||
Priority = 10;
|
||||
}
|
||||
|
||||
public override bool Condition()
|
||||
{
|
||||
List<CharacterBase> targets = CombatMainManager.Instance.characterController.GetAllEnemies(character);
|
||||
foreach (CharacterBase target in targets)
|
||||
{
|
||||
if (target.combatBuffSubmodule.TryGetBuff(out Burn burn))
|
||||
{
|
||||
if (burn.unitedStackSubmodule.stackAmount >= 5)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void RefreshCardWeights()
|
||||
{
|
||||
base.RefreshCardWeights();
|
||||
|
||||
foreach (CardInstance card in characterDeck.PoolPile)
|
||||
{
|
||||
if (card.cardLogic is WrathOfUnderworld)
|
||||
{
|
||||
card.cardLogic.weightSubmodule.forceUse = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class MarshallOfUnderworld : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user