Implementing a Risk Card - bugladen/bga7s5s GitHub Wiki

To implement a Risk card:

  1. If not done already, make sure the image for the card is stored at the proper location. Ensure that the image is sized correctly.
  2. Create a new PHP file in the proper location.
  3. In the new PHP file, create a class with the proper name.
  4. If the card is a city card, it must extend the Risk class.
  5. Using the card as a reference, set the properties of the new class as illustrated below.
  6. Ensure that parent::__construct() is called from your constructor.
  7. Add any passive or forced reaction code.
  8. Add any necessary Action classes.
  9. Add any necessary Reaction classes.
  10. Add any necessary Technique classes.
  11. Add any necessary Maneuver classes.

Below is the Risk card Not Today and its basic class definition - the code for the effects still need to be added.

<?php

namespace Bga\Games\SeventhSeaCityOfFiveSails\cards\_7s5s;

use Bga\Games\SeventhSeaCityOfFiveSails\cards\Risk;

class _01169 extends Risk
{
    public function __construct()
    {
        parent::__construct();

        $this->Name = "Not Today";
        $this->Image = "img/cards/7s5s/169.jpg";
        $this->ExpansionName = "_7s5s";
        $this->ExpansionNumber = 1;
        
        $this->WealthCost = 0;
        $this->Riposte = 0;
        $this->Parry = 5;
        $this->Thrust = 0;

        $this->Traits = [
            'Ad Hoc',
        ];
    }
}
⚠️ **GitHub.com Fallback** ⚠️