Skip to content

继承ModTemporaryPowerTemplate的power回合结束时报错 #29

Description

@hailverse

RitsuLib v0.2.13
sts2 v0.104.0
看起来是power.DynamicVars.Repeat.BaseValue没有获取到

[ERROR] System.Collections.Generic.KeyNotFoundException: The given key 'Repeat' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key)
at MegaCrit.Sts2.Core.Localization.DynamicVars.DynamicVarSet.get_Repeat()
at STS2RitsuLib.Combat.Powers.ModTemporaryPowerTemplate.AfterTurnEnd(PlayerChoiceContext choiceContext, CombatSide side)
at MegaCrit.Sts2.Core.Helpers.TaskHelper.WhenAny(Task[] tasks)
at MegaCrit.Sts2.Core.GameActions.Multiplayer.HookPlayerChoiceContext.AssignTaskAndWaitForPauseOrCompletion(Task task)
at MegaCrit.Sts2.Core.Hooks.Hook.AfterTurnEnd(ICombatState combatState, CombatSide side)
at MegaCrit.Sts2.Core.Combat.CombatManager.EndPlayerTurnPhaseTwoInternal()
at MegaCrit.Sts2.Core.Combat.CombatManager.AfterAllPlayersReadyToBeginEnemyTurn(Func1 actionDuringEnemyTurn) at MegaCrit.Sts2.Core.Helpers.TaskHelper.LogTaskExceptions(Task task) at MegaCrit.Sts2.Core.Helpers.TaskHelper.LogTaskExceptions(Task task) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.ExecutionContextCallback(Object s) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute) at System.Threading.Tasks.Task.TrySetException(Object exceptionObject) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.SetException(Exception exception, Task1& taskField) at MegaCrit.Sts2.Core.Combat.CombatManager.AfterAllPlayersReadyToBeginEnemyTurn(Func1 actionDuringEnemyTurn)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.SetException(Exception exception, Task1& taskField)
at MegaCrit.Sts2.Core.Combat.CombatManager.EndPlayerTurnPhaseTwoInternal()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task1.TrySetResult(TResult result) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.SetExistingTaskResult(Task1 task, TResult result) at MegaCrit.Sts2.Core.Commands.CardPileCmd+<Add>d__9.MoveNext_Patch2(<Add>d__9& this) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.ExecutionContextCallback(Object s) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext() at Godot.GodotSynchronizationContext.ExecutePendingContinuations() at Godot.GodotTaskScheduler.Activate() at Godot.Bridge.ScriptManagerBridge.FrameCallback()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.good first issueGood for a first external contribution.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions