@@ -1889,7 +1889,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
1889
1889
{DBGLN;
1890
1890
craft* Craft = craft::Spawn (this );DBGLN;
1891
1891
DBG4 (rpd.GetTool (),rpd.GetTool2 (),GetRightArm ()?GetRightArm ()->IsUsable ():0 ,GetLeftArm ()?GetLeftArm ()->IsUsable ():0 );
1892
-
1892
+
1893
1893
bool b1OK=false ;
1894
1894
bool b2OK=false ;
1895
1895
item* it;
@@ -1901,7 +1901,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
1901
1901
b1OK=true ;
1902
1902
Craft->SetMoveCraftTool (false );
1903
1903
}
1904
-
1904
+
1905
1905
if (!b1OK && GetRightArm () && GetRightArm ()->IsUsable ()){
1906
1906
if ((it = GetRightWielded ())){
1907
1907
Craft->SetRightBackupID (it->GetID ());
@@ -1914,7 +1914,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
1914
1914
b1OK=true ;
1915
1915
Craft->SetMoveCraftTool (true );
1916
1916
}
1917
-
1917
+
1918
1918
if (!b1OK && GetLeftArm () && GetLeftArm ()->IsUsable ()){
1919
1919
if ((it = GetLeftWielded ())){
1920
1920
Craft->SetLeftBackupID (it->GetID ());
@@ -1927,19 +1927,19 @@ truth humanoid::SwitchToCraft(recipedata rpd)
1927
1927
b1OK=true ;
1928
1928
Craft->SetMoveCraftTool (true );
1929
1929
}
1930
-
1930
+
1931
1931
}else {
1932
1932
b1OK=true ; // can craft somethings w/o tools
1933
1933
}
1934
-
1934
+
1935
1935
// TODO let the GetTool2() be equipped too?
1936
1936
1937
1937
if (b1OK){
1938
1938
Craft->SetCraftWhat (rpd);DBGLN;
1939
1939
SetAction (Craft);DBGLN;
1940
1940
return true ;
1941
1941
}
1942
-
1942
+
1943
1943
ADD_MESSAGE (" You have no usable arm." );
1944
1944
rpd.SetAlreadyExplained ();
1945
1945
return false ;
@@ -5390,7 +5390,7 @@ void FixSumoWrestlerHouse(festring fsCmdParams)
5390
5390
break ;
5391
5391
}
5392
5392
}
5393
-
5393
+
5394
5394
if (SM){
5395
5395
for (int d = 0 ; d < SM->GetNeighbourSquares (); ++d)
5396
5396
{
@@ -5412,7 +5412,7 @@ void sumowrestler::GetAICommand()
5412
5412
devcons::AddDevCmd (" FixSumoHouse" ,FixSumoWrestlerHouse,
5413
5413
" BugFix sumo wrestler house in case banana growers over crowd it." );
5414
5414
return true ;}();
5415
-
5415
+
5416
5416
EditNP (-25 );
5417
5417
5418
5418
SeekLeader (GetLeader ());
@@ -7227,7 +7227,7 @@ void aslonawizard::GetAICommand()
7227
7227
}
7228
7228
7229
7229
if (NearestEnemy && NearestEnemy->GetPos ().IsAdjacent (Pos) &&
7230
- (!(RAND () & 4 ) || StateIsActivated (PANIC)))
7230
+ (!(RAND () % 4 ) || StateIsActivated (PANIC)))
7231
7231
{
7232
7232
if (CanBeSeenByPlayer ())
7233
7233
ADD_MESSAGE (" %s invokes a spell and disappears." , CHAR_NAME (DEFINITE));
0 commit comments