AI refactor
This commit is contained in:
@@ -160,6 +160,7 @@ data Creature = Creature
|
||||
, _crAttentionDir :: AttentionDir
|
||||
, _crAwarenessLevel :: IM.IntMap AwarenessLevel
|
||||
, _crFaction :: Faction
|
||||
, _crGroup :: CrGroup
|
||||
, _crTarget :: Maybe Int
|
||||
}
|
||||
data WorldState
|
||||
@@ -492,6 +493,7 @@ infixr 9 `WaitThen`
|
||||
infixr 9 `DoActionThen`
|
||||
infixr 9 `DoActionWhile`
|
||||
infixr 9 `DoReplicate`
|
||||
infixr 9 `DoImpulsesAlongside`
|
||||
data Action
|
||||
= Attack
|
||||
{_attackTargetID :: Int}
|
||||
@@ -546,6 +548,10 @@ data Action
|
||||
,_doActionWhileCondition :: ( (World, Creature) -> Bool)
|
||||
,_doActionWhileAction :: Action
|
||||
}
|
||||
| DoActionIf
|
||||
{_doActionIfCondition :: ( (World, Creature) -> Bool)
|
||||
,_doActionIfAction :: Action
|
||||
}
|
||||
| DoActionIfElse
|
||||
{_doActionIfElseIfAction :: Action
|
||||
,_doActionIfElseCondition :: ( (World, Creature) -> Bool)
|
||||
|
||||
Reference in New Issue
Block a user