Refactor creature ai

This commit is contained in:
2021-05-20 21:25:42 +02:00
parent 4463dc7716
commit 114335fdbe
32 changed files with 449 additions and 270 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ throwGrenade
-> Int -- ^ Creature id
-> World
-> World
throwGrenade explosion n w = setWp $ removePict $ over projectiles addG $ w
throwGrenade explosion n w = setWp $ removePict $ over projectiles addG w
where
addG = IM.insert i $ Shell
{ _pjPos = p
@@ -95,7 +95,7 @@ throwArmReset x = ItInvEffect {_itInvEffect = f ,_itEffectCounter = x }
counterDown it
| _itEffectCounter (_itEffect it) == 0 = it
& itHammer .~ HammerUp
& itEquipPict .~ drawWeapon (grenadePic 50)
& itEquipPict .~ pictureWeaponOnAim (grenadePic 50)
| otherwise = it & itEffect . itEffectCounter -~ 1
--(grenadeAccL, grenadeAccA) = (0.1, 0.1)