Skip to content

Instantly share code, notes, and snippets.

@ltaoist
Created December 7, 2013 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltaoist/7840141 to your computer and use it in GitHub Desktop.
Save ltaoist/7840141 to your computer and use it in GitHub Desktop.
define(function(require, exports, module){
return {
avatar: 'img/Spider robot SH.png',
decider: function(status){
var self = status[status.index];
if(self.mp > 15){
if(Math.floor(Math.random() * 3))
return { code: 2 };
}
var x = Math.floor(Math.random() * 6);
if(x < 5){
return {
code: 1,
offx : Math.floor(Math.random() * 7) -3,
offy : Math.floor(Math.random() * 7) -3,
}
}else return {code: 3, msg: '不要在我受傷的時候來電我!'};
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment