import { Tags } from '../Tags' ; import { Player } from '../../Player' ; import { CorporationCard } from './../corporation/CorporationCard' ; import { IProjectCard } from '../IProjectCard' ; import { Resources } from '../../Resources' ; import { Card } from '../Card' ; import { CardName } from '../../CardName' ; import { CardType } from '../CardType' ; import { CardRenderer } from '../render/CardRenderer' ; import { Units } from '../../Units' ; import { played } from '../Options' ; export class CheungShingMARS extends Card implements CorporationCard { constructor ( ) { super ( { cardType : CardType . CORPORATION , name : CardName . CHEUNG_SHING_MARS , tags : [ Tags . BUILDING ] , startingMegaCredits : 44 , productionBox : Units . of ( { megacredits : 3 } ) , cardDiscount : { tag : Tags . BUILDING , amount : 2 } , metadata : { cardNumber : 'R16' , description : 'You start with 3 M€ production and 44 M€.' , renderData : CardRenderer . builder ( ( b ) => { b . br . br ; b . production ( ( pb ) => pb . megacredits ( 3 ) ) . nbsp . megacredits ( 44 ) ; b . corpBox ( 'effect' , ( ce ) => { ce . effect ( 'When you play a building tag, you pay 2 M€ less for it.' , ( eb ) => { eb . building ( 1 , { played } ) . startEffect . megacredits ( - 2 ) ; } ) ; } ) ; } ) , } , } ) ; } public getCardDiscount ( _player , card ) { return card . tags . filter ( ( tag ) => tag === Tags . BUILDING ) . length * 2 ; } public play ( player ) { player . addProduction ( Resources . MEGACREDITS , 3 ) ; return undefined ; } }