import { IProjectCard } from '../IProjectCard' ; import { CardName } from '../../CardName' ; import { CardType } from '../CardType' ; import { Tags } from '../Tags' ; import { Player } from '../../Player' ; import { Resources } from '../../Resources' ; import { CardRequirements } from '../CardRequirements' ; import { CardRenderer } from '../render/CardRenderer' ; import { Card } from '../Card' ; import { digit } from '../Options' ; export class DuskLaserMining extends Card implements IProjectCard { constructor ( ) { super ( { cardType : CardType . AUTOMATED , name : CardName . DUSK_LASER_MINING , cost : 8 , tags : [ Tags . SPACE ] , requirements : CardRequirements . builder ( ( b ) => b . tag ( Tags . SCIENCE , 2 ) ) , metadata : { cardNumber : 'X01' , description : 'Requires 2 Science tags. Decrease your energy production 1 step, and increase your titanium production 1 step. Gain 4 titanium.' , renderData : CardRenderer . builder ( ( b ) => { b . production ( ( pb ) => { pb . minus ( ) . energy ( 1 ) . br ; pb . plus ( ) . titanium ( 1 ) ; } ) . nbsp . titanium ( 4 , { digit } ) ; } ) , } , } ) ; } public canPlay ( player ) { return player . getProduction ( Resources . ENERGY ) >= 1 ; } public play ( player ) { player . addProduction ( Resources . ENERGY , - 1 ) ; player . addProduction ( Resources . TITANIUM , 1 ) ; player . titanium += 4 ; return undefined ; } }