Add random generator update when creature does random turn
This commit is contained in:
+89
-1
@@ -1061,7 +1061,95 @@ data Action
|
||||
}
|
||||
deriving (Generic)
|
||||
instance Show Action where
|
||||
show _ = "AnAction"
|
||||
show act = case act of
|
||||
AimAt
|
||||
{_targetID = tid
|
||||
,_targetSeenAt = p
|
||||
} -> "AimAt tid:"++show tid++" seenAt:"++show p
|
||||
PathTo
|
||||
{_pathToPoint = p
|
||||
} -> "PathTo:"++show p
|
||||
TurnToA
|
||||
{_turnToAPoint = p
|
||||
} -> "TurnToA:"++show p
|
||||
---- | PickupItem
|
||||
---- {_pickupItemID :: Int
|
||||
---- }
|
||||
ImpulsesList
|
||||
{_impulsesListList = iss
|
||||
} -> "ImpulsesList:"++show iss
|
||||
DoImpulses
|
||||
{_doImpulsesList = is
|
||||
} -> "DoImpulses:"++show is
|
||||
WaitThen
|
||||
{_waitThenTimer = i
|
||||
,_waitThenAction = a
|
||||
} -> "WaitThen timer:"++show i++" act:"++show a
|
||||
DoActionWhile
|
||||
{_doActionWhileCondition = _
|
||||
,_doActionWhileAction = a
|
||||
} -> "DoActionWhile (function) act:"++show a
|
||||
DoActionWhilePartial
|
||||
{_doActionWhilePartial = partact
|
||||
,_doActionWhileCondition = _
|
||||
,_doActionWhileAction = a
|
||||
} -> "DoActionWhilePartial partAct:"++show partact++" resetAct:"++show a
|
||||
DoActionIf
|
||||
{_doActionIfCondition = _
|
||||
,_doActionIfAction = a
|
||||
} -> "DoActionIf act:"++show a
|
||||
DoActionIfElse
|
||||
{_doActionIfElseIfAction = ifa
|
||||
,_doActionIfElseCondition = _
|
||||
,_doActionIfElseElseAction = elsea
|
||||
} -> "DoActionIfElse ifa:"++show ifa++" elsea:"++show elsea
|
||||
DoActionWhileInterrupt
|
||||
{_doActionWhileThenDo = whilea
|
||||
,_doActionWhileThenCondition = _
|
||||
,_doActionWhileThenThen = thena
|
||||
} -> "DoActionWhileInterrupt whilea:" ++show whilea++" interrupta:"++show thena
|
||||
DoActions
|
||||
{_doActionsList = as
|
||||
} -> "DoActions " ++ foldMap show as
|
||||
DoActionThen
|
||||
{_doActionThenFirst = a1
|
||||
,_doActionThenSecond = a2
|
||||
} -> "DoActionThen " ++ show a1 ++ " then:" ++ show a2
|
||||
---- | DoGuardActions
|
||||
---- {_doGuardActionsList :: [( (World, Creature) -> Bool, Action, Maybe Action)]
|
||||
---- }
|
||||
DoReplicate
|
||||
{_doReplicateTimes = i
|
||||
,_doReplicateAction = a
|
||||
} -> "DoReplicate times:" ++ show i ++ " act:"++ show a
|
||||
DoReplicatePartial
|
||||
{_partialAction = pa
|
||||
,_doReplicateTimes = i
|
||||
,_doReplicateAction = ra
|
||||
} -> "DoReplicatePartial pa:" ++ show pa ++ " times:" ++ show i ++ " reset:"++ show ra
|
||||
LeadTarget
|
||||
{_leadTargetBy = p
|
||||
} -> "LeadTarget by:"++ show p
|
||||
NoAction -> "NoAction"
|
||||
StartSentinelPost -> "StartSentinelPost"
|
||||
UseTarget
|
||||
{_useTarget = _
|
||||
} -> "UseTarget func"
|
||||
UseSelf
|
||||
{_useSelf = _
|
||||
} -> "UseSelf func"
|
||||
UseAheadPos
|
||||
{_useAheadPos = _
|
||||
} -> "UseAheadPos func"
|
||||
UseMvTargetPos
|
||||
{_useMvTargetPos = _
|
||||
} -> "UseMvTargetPos func"
|
||||
ArbitraryAction {} -> "ArbitraryAction func"
|
||||
DoImpulsesAlongside
|
||||
{_sideImpulses = is
|
||||
,_mainAction = a
|
||||
} -> "DoImpulsesAlongside sideImpulses:"++show is ++ " mainA:"++show a
|
||||
|
||||
-- deriving (Eq,Ord,Show)
|
||||
data Strategy
|
||||
= Flank Int
|
||||
|
||||
Reference in New Issue
Block a user