import { IProjectCard } from '../IProjectCard' ; import { Card } from '../Card' ; import { CardName } from '../../CardName' ; import { CardType } from '../CardType' ; import { Tags } from '../Tags' ; import { Player } from '../../Player' ; import { Resources } from '../../Resources' ; import { CardRenderer } from '../render/CardRenderer' ; import { played } from '../Options' ; export class OrbitalCleanup extends Card implements IProjectCard { constructor ( ) { super ( { cardType : CardType . ACTIVE , name : CardName . ORBITAL_CLEANUP , tags : [ Tags . EARTH , Tags . SPACE ] , cost : 14 , victoryPoints : 2 , metadata : { cardNumber : 'X08' , renderData : CardRenderer . builder ( ( b ) => { b . action ( 'Gain 1 M€ per Science tag you have.' , ( eb ) => { eb . empty ( ) . startAction . megacredits ( 1 ) . slash ( ) . science ( 1 , { played } ) ; } ) . br ; b . production ( ( pb ) => { pb . megacredits ( - 2 ) ; } ) ; } ) , description : 'Decrease your M€ production 2 steps.' , } , } ) ; } public canPlay ( player ) { return player . getProduction ( Resources . MEGACREDITS ) >= - 3 ; } public play ( player ) { player . addProduction ( Resources . MEGACREDITS , - 2 ) ; return undefined ; } public canAct ( ) { return true ; } public action ( player ) { player . addResource ( Resources . MEGACREDITS , player . getTagCount ( Tags . SCIENCE ) , { log : true } ) ; return undefined ; } }