Little Fighter Empire - Forums
Custom Julian AI (by Mr.Left) - Printable Version

+- Little Fighter Empire - Forums (https://www.lf-empire.de/forum)
+-- Forum: Little Fighter 2 Zone (https://www.lf-empire.de/forum/forumdisplay.php?fid=7)
+--- Forum: AI Scripting (https://www.lf-empire.de/forum/forumdisplay.php?fid=56)
+--- Thread: Custom Julian AI (by Mr.Left) (/showthread.php?tid=9825)



Custom Julian AI (by Mr.Left) - eplipswich - 04-16-2015

Original source: http://ztage.com/forum/viewtopic.php?f=10&t=15234

Well, I found this custom Julian AI in the official LF2 Chinese forum posted 2 years ago, and I thought it to be interesting. I'll test this out later, but feel free to test out and see if you can defeat Julian with this AI of his.

Code:
void id(){

D(0,0);
A(0,0);
J(0,0);
right(0,0);
down(0,0);
left(0,0);
up(0,0);

for (int i = 0; i < 400; ++i)
{
for (int i = 0; i < 400; i++){ //target
if (loadTarget(i) == 0 && target.num != self.num && target.hp > 0 && target.id < 100 && target.team != self.team){
break;
}
}
}

if(frame(260,276) && facing(1)){
if(abs(xdistance(self.num,target.num)) < 200 && abs(xdistance(self.num,target.num)) > 100){
D();
}
if(facing(1) && (abs(target.z-self.z) < 150 || abs(xdistance(self.num,target.num)) < 80)){
D();
shadow2();
}
}
else if(abs(target.z-self.z) > 40 && abs(xdistance(self.num,target.num)) > 100) {
if (target.z > self.z)
{
down();
}
else if(target.z < self.z)
{
up();
}
}
else if(target.state == 16 && abs(xdistance(self.num,target.num)) > 0 && abs(xdistance(self.num,target.num)) < 50 && abs(target.z-self.z) < 9){
col();
}
else if(abs(xdistance(self.num,target.num)) > 120 && (target.state == 7 || target.state == 16 || target.state == 15) && abs(target.z-self.z) < 12){
DfJ();
}
else if(abs(xdistance(self.num,target.num)) < 50 && abs(target.z-self.z) < 120){
int r = rand(2);
if(r!=0){A();}else{shadow();}
}
else if(abs(xdistance(self.num,target.num)) < 80 && abs(target.z-self.z) < 30 && (target.state == 14 || target.blink != 0)){
shadow();
} else if(abs(xdistance(self.num,target.num)) > 400 ||(target.state == 14 && abs(xdistance(self.num,target.num)) > 200)){
DbA();
}
else if(target.state != 14 && target.blink == 0) {
DfA();
}
}

void DbA(){
if(xdistance(self.num,target.num) > 0){DlA();}
else{DrA();}
}

void DfA(){
if(xdistance(self.num,target.num) > 0){DrA();}
else{DlA();}
}

void DfJ(){
if(xdistance(self.num,target.num) > 0){DrJ();}
else{DlJ();}
}

void col(){
if(facing(0)){
DuJ();
}
}

void upper_punch(){
if(facing(0)){
DuA();
}
}

void shadow(){
if(facing(1)){
DJA();
}
}

void shadow2(){
if(facing(0)){
DJA();
if(abs(target.z-self.z) > 20) {
if (target.z > self.z)
{
up();
}
else if(target.z < self.z)
{
down();
}
}
}
}

bool frame(int first, int last){
if(self.frame>=first && self.frame<=last){return true;}
else{return false;}
}

bool facing(int tar){
if(tar==0){
if((self.x-target.x)*(2*(self.facing?1:0)-1)>0){return true;}
else{return false;}
}
else{
if((target.x-self.x)*(2*(target.facing?1:0)-1)>0){return true;}
else{return false;}
}
}

int facing_distance(int s, int t){
return xdistance(t,s)*(2*(self.facing?1:0)-1);
}
int xdistance(int s, int t){
loadTarget(s);
int sx=target.x;
loadTarget(t);
int tx=target.x;
return tx-sx;
}



RE: Custom Julian AI (by Mr.Left) - STM1993 - 04-16-2015

Oh god, this shows how overpowered Julian's skull blasts really are. I only managed to beat him because I used Dennis' infinite combo on him against a wall and because Dennis is pretty good for powering through regular projectiles.

Here's a video:




tl;dr:
D>A spammer.
When get too close, he'd punch you or mirror image away.
He does occasionally use D>J, but because he spams D>A so much he rarely has the mana to use it.


RE: Custom Julian AI (by Mr.Left) - AmadisLFE - 04-20-2015

This is almost like what happens when you do F6 and play against Julian on Crazy, he spams D>A like a Mad Man.