2 /** No multi-tile support */
3 if (!Char
->CheckKick()) return false;
4 if (Char
->GetBurdenState() == OVER_LOADED
) {
5 ADD_MESSAGE("You try to kick, but you collapse under your load.");
6 Char
->EditAP(-100000/APBonus(Char
->GetAttribute(AGILITY
)));
9 int Dir
= game::DirectionQuestion(CONST_S("In what direction do you wish to kick? [press a direction key]"), false);
10 if (Dir
== DIR_ERROR
|| !Char
->GetArea()->IsValidPos(Char
->GetPos()+game::GetMoveVector(Dir
))) return false;
11 lsquare
*Square
= Char
->GetNearLSquare(Char
->GetPos()+game::GetMoveVector(Dir
));
12 if (!Square
->CheckKick(Char
)) return false;
13 character
*Enemy
= Square
->GetCharacter();
14 if (Enemy
&& !(Enemy
->IsMasochist() && Char
->GetRelation(Enemy
) == FRIEND
) && Char
->GetRelation(Enemy
) != HOSTILE
) {
15 if (!game::TruthQuestion(CONST_S("This might cause a hostile reaction. Are you sure? [y/N]"))) return false;
17 game::ClearEventData();
18 game::mActor
= Square
->GetCharacter();
19 game::mSecondActor
= Char
;
20 if (game::RunOnCharEvent(Char
, CONST_S("before_kick"))) { game::ClearEventData(); return game::mResult
!= 0; }
21 game::ClearEventData();
23 game::mSecondActor
= Square
->GetCharacter();
24 if (game::RunOnCharEvent(Square
->GetCharacter(), CONST_S("before_kicked_by"))) { game::ClearEventData(); return game::mResult
!= 0; }
25 game::ClearEventData();
26 Char
->Hostility(Square
->GetCharacter());
27 Char
->Kick(Square
, Dir
);