2020-04-16 19:53:23 +09:00
|
|
|
'use strict'
|
|
|
|
|
|
2022-09-21 20:15:40 -05:00
|
|
|
function Card_Shield (sym, value, type, name = 'Unknown', svg = '') {
|
|
|
|
|
Card.call(this, sym, value, type, name, svg)
|
2020-04-16 19:53:23 +09:00
|
|
|
|
|
|
|
|
this.touch = function () {
|
|
|
|
|
if (this.is_flipped == true) { console.log('Card is already flipped'); return }
|
|
|
|
|
if (donsol.player.health.value < 1) { console.log('Player is dead'); return }
|
|
|
|
|
this.flip()
|
|
|
|
|
donsol.player.equip_shield(this.value)
|
|
|
|
|
donsol.board.update()
|
|
|
|
|
}
|
|
|
|
|
}
|