Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
milanvanzanten committed Jun 22, 2015
2 parents 35db2bd + 4aa5500 commit cfb5fa6
Show file tree
Hide file tree
Showing 11 changed files with 285 additions and 328 deletions.
12 changes: 12 additions & 0 deletions resources/teams/Apes/Gorilla.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ with(imports) {
var Pitch = Java.type("gameLogic.Pitch");
playerToBeThrown.invokeSetPlayerCondition(PlayerCondition.DEAD);
playerToBeThrown.invokeSetPosition(Pitch.THE_VOID);
player.sendMessageShowMe(player.toString(), "Oups, I just squeezed the poor blond capuchin to death.");
var parameterArray = [];
parameterArray[0] = FAILD_CLUMSY;
player.getMatch().sendMessage(player.getMatch().getUser(userIndex), SBProtocolCommand.EVENT, parameterArray);
Expand Down Expand Up @@ -83,6 +84,9 @@ with(imports) {
if(willFailForSure){
var message = new SBProtocolMessage(player.getTeam().getCoach().getUID(), SBProtocolCommand.EVENT, " ");
player.getRule(1).playerDown(message, player, YOU_SUCK);
if(player.getMatch().getPitch().getBallPos() == player.getPos()){
player.getRule(4).scatterBallAround(userIndex);
}
}else{
var enemyIndex = -1;
if(userIndex == 0){
Expand All @@ -94,6 +98,14 @@ with(imports) {
if(!(player.getRule(0).geTest(mod))){
var message = new SBProtocolMessage(player.getTeam().getCoach().getUID(), SBProtocolCommand.EVENT, " ");
player.getRule(1).playerDown(message, player, YOU_SUCK);
if(player.getMatch().getPitch().getBallPos() == player.getPos()){
player.getRule(4).scatterBallAround(userIndex);
}
}
if(!(player.getRule(0).geTest(mod))){
if(player.getMatch().getPitch().getBallPos() == player.getPos()){
player.getRule(4).scatterBallAround(userIndex);
}
}
}
}else{
Expand Down
1 change: 1 addition & 0 deletions resources/teams/Apes/HowlerMonkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ with(imports) {
player.getRule(1).throwDice(message, defender);
}else{
player.getRule(1).beatHim(defender, message, true);
player.getRule(2).apply(message, defender, defender.getPosition(), player.getTeam().getCoach().getUID(), player, defender.getPos());
}
} else player.getRule(1).returnFailureMessage(message, SBProtocolMessage.FAILD_BLOCKING_NOT_POSSIBLE);
} else player.getRule(1).returnFailureMessage(message, SBProtocolMessage.FAILD_PLAYER_CANNOT_TAKE_ACTION);
Expand Down
Loading

0 comments on commit cfb5fa6

Please sign in to comment.