1.7.4 : Mario has 50% chance to kick another if he jump or run
This commit is contained in:
@@ -19,7 +19,7 @@ import fr.klemek.minimario.LocalServer.ConnectionListener;
|
|||||||
|
|
||||||
public abstract class Launch {
|
public abstract class Launch {
|
||||||
|
|
||||||
private static final String VERSION = "1.7.3";
|
private static final String VERSION = "1.7.4";
|
||||||
|
|
||||||
private static TrayIcon trayIcon;
|
private static TrayIcon trayIcon;
|
||||||
private static PopupMenu popup;
|
private static PopupMenu popup;
|
||||||
|
|||||||
@@ -228,12 +228,15 @@ public class MarioAI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.spdy<=0){
|
if(this.spdy<=0 && (this.state == State.JUMPING || this.state == State.RUNNING)){
|
||||||
Rectangle bounds = this.getBounds();
|
Rectangle bounds = this.getBounds();
|
||||||
for(MarioAI ma:getOthers(this.id)){
|
for(MarioAI ma:getOthers(this.id)){
|
||||||
if(ma.spdy<=0 && !ma.isInvicible() && bounds.intersects(ma.getBounds())){
|
if(ma.spdy<=0 && !ma.isInvicible() && bounds.intersects(ma.getBounds())){
|
||||||
ma.fall();
|
int randi = Utils.nextInt(100);
|
||||||
ma.setKicked(true);
|
if(randi<50){
|
||||||
|
ma.fall();
|
||||||
|
ma.setKicked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user