137138139140141142143144145146147
} class ActionMoronAI extends Action { public void run() { ElementPlayer p = (ElementPlayer) me; int r = (int) (Math.random() * 250); switch (r) { case 1: p.actions.forceAction("input", new KeyFlag(KeyFlag.LEFT));
33343536373839404142
} public void elementCollided(Element e) { if(e.type==Common.ElementType.PLAYER) { ElementPlayer p = ((ElementPlayer)e); p.gl.get(p.currentGunIndex).addAmmo(ammoGap); } }
3132333435363738394041
public void elementCollided(Element e) { Common.info(1," This:"+this+ " Collided with"+e+""); if(e.type==Common.ElementType.PLAYER) { ElementPlayer p = ((ElementPlayer)e); ((ElementPlayer) e).lastTouch=null; p.energy-=damage; } }
525354555657585960616263
keysQueue = new ArrayList<KeyFlag>(); } public void run() { ElementPlayer pme = (ElementPlayer)me; KeyFlag newKeys = popKeys(); if(newKeys == null && currentKeys!=null && currentKeys.Key!=KeyFlag.NONE) newKeys=currentKeys; if(newKeys == null) return; pme.input(newKeys); currentKeys = newKeys; }