Some works on FIGH's AI.

This commit is contained in:
savask 2011-10-31 10:11:40 +07:00
parent 6de8346cdb
commit 8e00d07f35

View File

@ -51,14 +51,26 @@ int update_FIGH(UPDATE_FUNC_ARGS)
else else
if (tarx<x ) if (tarx<x )
{ {
if(!eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL))
figh->comm = 0x01; figh->comm = 0x01;
if (!eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) || !eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL)) else
figh->comm = 0x02;
if (!eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL)
|| !eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL)
|| eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL))
figh->comm = (int)figh->comm | 0x04; figh->comm = (int)figh->comm | 0x04;
} }
else else
{ {
if (!eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL))
figh->comm = 0x02; figh->comm = 0x02;
if (!eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) || !eval_move(PT_DUST, figh->legs[12]+4, figh->legs[13]-1, NULL)) else
figh->comm = 0x01;
if (!eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL)
|| !eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL)
|| eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL))
figh->comm = (int)figh->comm | 0x04; figh->comm = (int)figh->comm | 0x04;
} }
break; break;