import { IActionCard } from '../ICard' ; import { IProjectCard } from '../IProjectCard' ; import { Tags } from '../Tags' ; import { Card } from '../Card' ; import { CardType } from '../CardType' ; import { Player } from '../../Player' ; import { CardName } from '../../CardName' ; import { CardRenderer } from '../render/CardRenderer' ; import { digit } from '../Options' ; export class Meltworks extends Card implements IActionCard , IProjectCard { constructor ( ) { super ( { cardType : CardType . ACTIVE , name : CardName . MELTWORKS , tags : [ Tags . BUILDING ] , cost : 4 , metadata : { cardNumber : 'X26' , renderData : CardRenderer . builder ( ( b ) => { b . action ( 'Spend 5 heat to gain 3 steel.' , ( eb ) => { eb . heat ( 5 , { digit } ) . startAction . steel ( 3 ) ; } ) ; } ) , } , } ) ; } public play ( _player ) { return undefined ; } public canAct ( player ) { return player . availableHeat >= 5 ; } public action ( player ) { return player . spendHeat ( 5 , ( ) => { player . steel += 3 ; return undefined ; } ) ; } }