# HG changeset patch # User Wuzzy # Date 1508297302 -7200 # Node ID 1ab53b9451401e3d13fb02696a32ee64e5add966 # Parent 8673892ebf2422c593a276b3c4c27146fb6818dc AI hogs use timebox instead of skip if clueless what to do diff -r 8673892ebf24 -r 1ab53b945140 ChangeLog.txt --- a/ChangeLog.txt Wed Oct 18 03:39:01 2017 +0200 +++ b/ChangeLog.txt Wed Oct 18 05:28:22 2017 +0200 @@ -18,7 +18,7 @@ + New weapon: rubber duck + Freezer can now freeze sticky mines (they get disabled and fall into the water) + Improved hedgehog spawns on maps that lack land mass or free space - + AI hedgehogs can now use Bee and Vampirism + + AI hedgehogs can now use Bee, Vampirism and Time Box + Divided Teams mode will now work with more than 2 teams (Hint: you probably want to set world edges to "wrap" in such games) + Fort Mode will now work with more than 2 teams + Render graves behind everything else, so that they can't hide mines etc. diff -r 8673892ebf24 -r 1ab53b945140 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Wed Oct 18 03:39:01 2017 +0200 +++ b/hedgewars/uAI.pas Wed Oct 18 05:28:22 2017 +0200 @@ -471,8 +471,17 @@ FillBonuses(false); + // Hog has no idea what to do. Use tardis or skip if not bonuses.activity then - AddAction(BestActions, aia_Skip, 0, 250, 0, 0); + if ((HHHasAmmo(Me^.Hedgehog^, amTardis) > 0)) and (random(3) < 1) then + // Tardis brings hog to a random place. Perfect for clueless AI + begin + AddAction(BestActions, aia_Weapon, Longword(amTardis), 80, 0, 0); + AddAction(BestActions, aia_attack, aim_push, 10, 0, 0); + AddAction(BestActions, aia_attack, aim_release, 10, 0, 0); + end + else + AddAction(BestActions, aia_Skip, 0, 250, 0, 0); end; end else SDL_Delay(100)