30 if (opponent.
health <= 0)
return;
45 if (
next.delay <= 0) {
53 float attackRange = 142;
54 float tooCloseRange = 50;
55 float waitRange = attackRange + 50;
73 if (actorBlocking || actorAttacking)
return;
75 boolean blockOnlyMode =
false;
76 boolean allowAttack =
true;
84 noBlockDur = 0.5f + (float) Math.random() * 0.2f;
92 float delay = 0.2f * (float) Math.random();
102 if (opponentAttacking) {
106 if (actorPerformedBlock) {
107 moveDelay = 0.1f + (float) Math.random() * 0.05f;
114 if (dist > waitRange) {
116 moveDelay = 0.3f + (float) Math.random() * 0.2f;
118 }
else if (dist > attackRange) {
120 moveDelay = 0.3f + (float) Math.random() * 0.2f;
125 if ((dist < attackRange || actorPerformedBlock) &&
moveDelay <= 0 && (!blockOnlyMode || allowAttack)) {
127 moveDelay = 0.1f + (float) Math.random() * 2f;