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

@ -49,16 +49,28 @@ int update_FIGH(UPDATE_FUNC_ARGS)
figh->comm = (int)figh->comm | 0x08;
}
else
if (tarx<x)
if (tarx<x )
{
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))
if(!eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL))
figh->comm = 0x01;
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;
}
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))
{
if (!eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL))
figh->comm = 0x02;
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;
}
break;