Created
April 14, 2019 22:22
-
-
Save iskenxan/d43703ca3ac28ad29d3192b1fa05f705 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Flying = stampit(Character, { | |
| methods: { | |
| fly() { | |
| console.log(`${this.name} takes off in the sky!`) | |
| stamina --; | |
| } | |
| } | |
| }); | |
| const SuperStrength = stampit(Character, { | |
| methods: { | |
| init({ stamina = this.stamina }) { | |
| this.stamina = stamina | |
| }, | |
| throwBoulder() { | |
| console.log(`${this.name} throws a huge rock at the enemy!`) | |
| stamina -= 2; | |
| } | |
| } | |
| }); | |
| const Intelligence = stampit(Character, { | |
| methods: { | |
| useGadget() { | |
| console.log(`${this.name} shoots a DIY lazer gun!`) | |
| } | |
| } | |
| }); | |
| const MartialArts = stampit(Character, { | |
| MartialArts: { | |
| throwBoulder() { | |
| console.log(`${this.name} does a 'Flying Dragon' kick!`) | |
| stamina -= 3; | |
| } | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment