Added old files
This commit is contained in:
parent
9ae92803ce
commit
ef3620f4f9
86 changed files with 2157 additions and 0 deletions
13
sources/scripts/card.monster.js
Normal file
13
sources/scripts/card.monster.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict'
|
||||
|
||||
function Card_Monster (sym, value, type, name = 'Unknown') {
|
||||
Card.call(this, sym, value, type, name)
|
||||
|
||||
this.touch = function () {
|
||||
if (this.is_flipped) { console.log('Card is already flipped'); return }
|
||||
if (donsol.player.health.value < 1) { console.log('Player is dead'); return }
|
||||
this.flip()
|
||||
donsol.player.attack(this)
|
||||
donsol.board.update()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue