Example #1
0
    //Option 2-4
    public static Option conquerWilderness()
    {
        int natureDmg = 5;
        int stamLoss  = 1;

        Option o = new Option();

        o.description    = string.Format("Spend {0} extra stamina", stamLoss);
        o.descriptionPow = string.Format("Deals {0} damage to next natural obstacle encountered.", natureDmg);
        o.shortened      = "Conquer";

        //Base Action
        o.defaultCons = new Consequence(0, -1 - stamLoss, 0, -natureDmg, null, o.description);

        //Powered Action
        o.powerCons = new Consequence(0, -1, 0, -natureDmg, null, o.description);
        o.powerCons.specialAction += () => o.fm.modifyNextObstacleIf(obs => obs.obstacleClass == Obstacle.ObstacleClass.Nature, obs => obs.assignDamage(0, -natureDmg), true);
        o.powerCons.specialAction += () => o.conduit.resetPower();

        o.rewards     = new Option[] { treatWounds(), takeShelter() };
        o.rewardProbs = new float[] { 0.25f, 0.75f };

        Conduit.connector[] topConnections    = Conduit.newConnectors((int)Conduit.powerColors.green, -1, -1);
        Conduit.connector[] bottomConnections = new Conduit.connector[3];
        o.conduit = new Conduit(o, topConnections, bottomConnections);

        return(o);
    }
Example #2
0
    //Option 2-1
    public static Option swiftKill()
    {
        int monsterDmg = 3;
        int natureDmg  = 1;

        Option o = new Option();

        o.descriptionPow = "Spend all power. Flee if obstacle is below half health"; //String format
        o.shortened      = "Swift Kill";

        //Base Action
        o.defaultCons = new Consequence(0, -1, -monsterDmg, -natureDmg, null, o.description);

        //Powered Action
        o.powerCons = new Consequence(0, -1, -monsterDmg, -natureDmg, () => o.conduit.resetPower(), o.descriptionPow);
        o.powerCons.flee(.5f); //Ideally this happens after damage

        o.rewards     = new Option[] { treatWounds(), takeShelter() };
        o.rewardProbs = new float[] { 0.75f, 0.5f };

        Conduit.connector[] topConnections    = Conduit.newConnectors((int)Conduit.powerColors.red, -1, -1);
        Conduit.connector[] bottomConnections = new Conduit.connector[3];
        o.conduit = new Conduit(o, topConnections, bottomConnections);

        return(o);
    }
Example #3
0
    //Option 2-2
    public static Option layLand()
    {
        int monsterDmg = 2;
        int natureDmg  = 2;

        Option o = new Option();

        o.descriptionPow = "Spend all power to change the next obstacle's type";
        o.shortened      = "Lay of the Land";

        //Base Action
        o.defaultCons = new Consequence(0, -1, -monsterDmg, -natureDmg, null, o.description);

        //Powered Action
        o.powerCons = new Consequence(0, -1, -monsterDmg, -natureDmg, null, o.description);
        o.powerCons.specialAction += () => o.fm.modifyNextObstacleIf(obs => true, obs => o.gm.redoObstacle(), true); //Should not use this code for this purpose.
        o.powerCons.specialAction += () => o.conduit.resetPower();

        o.rewards     = new Option[] { treatWounds(), takeShelter(), investigateSurroundings() };
        o.rewardProbs = new float[] { 0.75f, 0.75f, .25f };

        Conduit.connector[] topConnections    = Conduit.newConnectors(-1, (int)Conduit.powerColors.yellow, -1);
        Conduit.connector[] bottomConnections = new Conduit.connector[3];
        o.conduit = new Conduit(o, topConnections, bottomConnections);

        return(o);
    }
Example #4
0
    //Option 2-0
    public static Option recklessAssault()
    {
        int monsterDmg = 5;
        int stamLoss   = 1;

        Option o = new Option();

        o.description    = string.Format("Spend {0} extra stamina", stamLoss);
        o.descriptionPow = "Spend all power";
        o.shortened      = "Assault";

        //Base Action
        o.defaultCons = new Consequence(0, -1 - stamLoss, -monsterDmg, 0, null, o.description);

        //Powered Action
        o.powerCons = new Consequence(0, -1, -2 * monsterDmg, 0, () => o.conduit.resetPower(), o.descriptionPow);

        o.rewards     = new Option[] { treatWounds(), takeShelter() };
        o.rewardProbs = new float[] { 0.75f, 0.25f };

        Conduit.connector[] topConnections    = Conduit.newConnectors(-1, -1, (int)Conduit.powerColors.red);
        Conduit.connector[] bottomConnections = new Conduit.connector[3];
        o.conduit = new Conduit(o, topConnections, bottomConnections);

        return(o);
    }
Example #5
0
    //Option 2-3
    public static Option rangerTactics()
    {
        int monsterDmg = 1;
        int natureDmg  = 3;

        Option o = new Option();

        o.shortened = "Ranger Tactics";

        //Base Action
        o.defaultCons = new Consequence(0, -1, -monsterDmg, -natureDmg, null, o.description);

        //Powered Action
        o.powerCons = new Consequence(0, -1, -monsterDmg - natureDmg, -natureDmg, null, o.descriptionPow); //should describe that it adds nature dmg to monster dmg

        o.rewards     = new Option[] { treatWounds(), takeShelter() };
        o.rewardProbs = new float[] { 0.5f, 0.75f };
        Conduit.connector[] topConnections    = Conduit.newConnectors(-1, -1, (int)Conduit.powerColors.green);
        Conduit.connector[] bottomConnections = new Conduit.connector[3];
        o.conduit = new Conduit(o, topConnections, bottomConnections);


        return(o);
    }