From 8e00d07f35394c098da073a86e1f986a1d800705 Mon Sep 17 00:00:00 2001 From: savask Date: Mon, 31 Oct 2011 10:11:40 +0700 Subject: [PATCH] Some works on FIGH's AI. --- src/elements/figh.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/elements/figh.c b/src/elements/figh.c index 99f39b13c..36cc3929a 100644 --- a/src/elements/figh.c +++ b/src/elements/figh.c @@ -49,16 +49,28 @@ int update_FIGH(UPDATE_FUNC_ARGS) figh->comm = (int)figh->comm | 0x08; } else - if (tarxcomm = 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;