Dataify impulse/action/strategy function fields

This commit is contained in:
2022-07-21 21:45:31 +01:00
parent 14f3c8bc52
commit 583027112d
7 changed files with 45 additions and 36 deletions
+5 -4
View File
@@ -21,6 +21,7 @@ module Dodge.Creature.Action
)
where
import Dodge.Inventory.Add
import Dodge.CreatureEffect
--import Dodge.ShortShow
import Dodge.Path
import Dodge.Default
@@ -111,18 +112,18 @@ performAction cr w ac = case ac of
(imps , Nothing ) -> (imps, Just afta)
DoActionWhile f act -> performAction cr w $ DoActionWhilePartial act f act
DoActionWhilePartial partAc f resetAc
| f w cr -> case performAction cr w partAc of
| doWdCrBl f w cr -> case performAction cr w partAc of
(imps, Just nxta) -> (imps, Just $ DoActionWhilePartial nxta f resetAc)
(imps, Nothing) -> (imps, Just $ DoActionWhilePartial resetAc f resetAc)
| otherwise -> performAction cr w partAc
DoActionIf f ifa
| f w cr -> performAction cr w ifa
| doWdCrBl f w cr -> performAction cr w ifa
| otherwise -> ([],Nothing)
DoActionIfElse ifa f elsea
| f w cr -> performAction cr w ifa
| doWdCrBl f w cr -> performAction cr w ifa
| otherwise -> performAction cr w elsea
DoActionWhileInterrupt repa f afta
| f w cr -> (fst $ performAction cr w repa, Just $ DoActionWhileInterrupt repa f afta)
| doWdCrBl f w cr -> (fst $ performAction cr w repa, Just $ DoActionWhileInterrupt repa f afta)
| otherwise -> performAction cr w afta
DoActions [] -> ([], Nothing)
DoActions acs ->