Skip to content

Instantly share code, notes, and snippets.

@jwulf
Created August 5, 2017 00:50
Show Gist options
  • Save jwulf/55dee760c6e3804cec342e5a1dac5412 to your computer and use it in GitHub Desktop.
Save jwulf/55dee760c6e3804cec342e5a1dac5412 to your computer and use it in GitHub Desktop.
Snowballer spell
const magik = magikcraft.io;
function sb(repeats = 200, delay = 300) {
magik.dixit('Snowball!');
const sender = magik.getSender();
const snowball = magik.type("entity.Snowball").class;
const hurl = (thing) => () => sender.launchProjectile(thing)
const volley = () => magik.doNTimes(hurl(snowball), repeats, delay, null);
magik.doNTimes(volley, repeats, delay*10, null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment