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 { Resources } from '../../Resources' ; import { CardName } from '../../CardName' ; import { CardRenderer } from '../render/CardRenderer' ; import { Units } from '../../Units' ; export class SpaceElevator extends Card implements IActionCard , IProjectCard { constructor ( ) { super ( { cardType : CardType . ACTIVE , name : CardName . SPACE_ELEVATOR , tags : [ Tags . SPACE , Tags . BUILDING ] , cost : 27 , productionBox : Units . of ( { titanium : 1 } ) , victoryPoints : 2 , metadata : { cardNumber : '203' , renderData : CardRenderer . builder ( ( b ) => { b . action ( 'Spend 1 steel to gain 5 M€.' , ( eb ) => { eb . steel ( 1 ) . startAction . megacredits ( 5 ) ; } ) . br ; b . production ( ( pb ) => pb . titanium ( 1 ) ) ; } ) , description : 'Increase your titanium production 1 step.' , } , } ) ; } public play ( player ) { player . addProduction ( Resources . TITANIUM , 1 ) ; return undefined ; } public canAct ( player ) { return player . steel > 0 ; } public action ( player ) { player . steel -- ; player . megaCredits += 5 ; return undefined ; } }