import { CorporationCard } from '../corporation/CorporationCard' ; import { Player } from '../../Player' ; import { Resources } from '../../Resources' ; import { Card } from '../Card' ; import { CardName } from '../../CardName' ; import { CardType } from '../CardType' ; import { CardRenderer } from '../render/CardRenderer' ; import { Size } from '../render/Size' ; import { all } from '../Options' ; export class MonsInsurance extends Card implements CorporationCard { constructor ( ) { super ( { cardType : CardType . CORPORATION , name : CardName . MONS_INSURANCE , startingMegaCredits : 48 , metadata : { cardNumber : 'R46' , description : 'You start with 48 M€. Increase your M€ production 4 steps. ALL OPPONENTS DECREASE THEIR M€ production 2 STEPS. THIS DOES NOT TRIGGER THE EFFECT BELOW.' , renderData : CardRenderer . builder ( ( b ) => { b . megacredits ( 48 ) . production ( ( pb ) => { pb . megacredits ( 4 ) . nbsp . megacredits ( - 2 , { all } ) . asterix ( ) ; } ) ; b . corpBox ( 'effect' , ( cb ) => { cb . vSpace ( Size . SMALL ) ; cb . effect ( 'When a player causes another player to decrease production or lose resources, pay 3M€ to the victim, or as much as possible.' , ( eb ) => { eb . production ( ( pb ) => pb . wild ( 1 , { all } ) ) . or ( ) . minus ( ) . wild ( 1 , { all } ) ; eb . startEffect . text ( 'pay' , Size . SMALL , true ) . megacredits ( 3 ) ; } ) ; } ) ; } ) , } , } ) ; } public play ( player ) { player . addProduction ( Resources . MEGACREDITS , 6 ) ; for ( const p of player . game . getPlayers ( ) ) { p . addProduction ( Resources . MEGACREDITS , - 2 , { log : true } ) ; } player . game . monsInsuranceOwner = player . id ; return undefined ; } }