Пример #1
0
    protected ExplorationEvent getLost(SpeciesFactory.Species species)
    {
        ExplorationEvent e = new ExplorationEvent();

        e.options = new List <ExplorationEvent.Option>();

        int TrackingScore = 10;
        List <ExplorationCriteria> variableStuckReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), int.MinValue, TrackingScore, new RewardImpl.FoodPenalty(5)),
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), TrackingScore, 2 * TrackingScore, new RewardImpl.DoNothingReward("You catch your bearings")),
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), 2 * TrackingScore, int.MaxValue, new RewardImpl.FoodReward(5))
        };

        e.options.Add(new ExplorationEvent.Option("Find your way out", variableStuckReward));

        e.options.Add(
            new ExplorationEvent.Option("Send out your flyer", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.DoNothingReward("From high up in the air, your winged creature sees the way forward"), new RewardImpl.DoNothingReward("From high up in the air, your winged creature sees the way forward"), new List <string>()
        {
            TraitFactory.Traits.Flying.ToString()
        }));

        e.options.Add(
            new ExplorationEvent.Option("Send your climber up a tree", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.DoNothingReward("From high up in the tree your creature sees the way forward"), new RewardImpl.DoNothingReward("From the top of the tree your creature sees the way forward"), new List <string>()
        {
            TraitFactory.Traits.Climb.ToString()
        }));


        return(e);
    }
Пример #2
0
    protected ExplorationEvent attackedBy(SpeciesFactory.Species species, int numAttackers, string trumpOption)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        int foodReward = animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()) * numAttackers;

        string foodString = "";

        if (numAttackers == 1)
        {
            e.description = "You are attacked by a wild " + species.ToString();
            foodString    = "You killed the " + species.ToString() + " and harvest its meat to feed your animals";
        }
        else
        {
            e.description = "You are attacked by a pack of " + numAttackers + " wild " + species.ToString();
            foodString    = "You killed every last " + species.ToString() + " and make a meal of their corpses.  you collect a feast of " + foodReward + " food.";
        }

        e.options = new List <ExplorationEvent.Option>();

        int fightScore    = Mathf.FloorToInt(animalReward.GetAttributeScore(TraitFactory.Attribute.Fighting.ToString()) * (0.5f + numAttackers));
        int trackingScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString());



        List <ExplorationCriteria> variableAnimalReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), int.MinValue, fightScore * 2, new RewardImpl.RandomAnimalPenalty("The pack of wild " + species.ToString() + " tear one of your animals apart.")),
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), fightScore * 2, fightScore * 2 + 3, new RewardImpl.FoodPenalty(25,
                                                                                                                                               "The " + species.ToString() + " nearly killed you.  Before you dealt the winning blow it tore into your pack and scatterd your suppplies.  You lost 25 food.")),
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), fightScore * 2 + 3, int.MaxValue, new RewardImpl.FoodReward(foodReward, foodString))
        };

        List <ExplorationCriteria> variableTrackingReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore, new RewardImpl.RandomAnimalPenalty("You did not run faster than the pack of wild " + species.ToString() + ".")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore, trackingScore * 2,
                                    new RewardImpl.FoodPenalty(animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()), "You drop some of your supplies as you run.  You lose " + animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()) + " food")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 2, int.MaxValue, new RewardImpl.DoNothingReward("You escape without losing any of your animals"))
        };


        e.options.Add(new ExplorationEvent.Option("Stand your ground.", variableAnimalReward));
        e.options.Add(new ExplorationEvent.Option("Run like the wind.", variableTrackingReward));

        if (trumpOption != null)
        {
            e.options.Add(
                new ExplorationEvent.Option("Lucky for you, " + species.ToString() + " are afraid of " + trumpOption + ", you can scare them away.", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.AnimalReward(animalReward), new RewardImpl.DoNothingReward("Nothing interesting happens."), new List <string>()
            {
                trumpOption
            }));
        }

        return(e);
    }
Пример #3
0
    protected ExplorationEvent findACave(SpeciesFactory.Species species)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        e.description = "You come across a cave, the opening looks treacherous. You think you hear an animal inside.";
        e.options     = new List <ExplorationEvent.Option>();

        List <AnimalDef> twoAnimals = new List <AnimalDef>()
        {
            animalReward, animalReward
        };


        int strengthScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Strength.ToString());

        List <ExplorationCriteria> variableAnimalReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, strengthScore, new RewardImpl.RandomAnimalPenalty("Somestimes things go into a cave, but don't come out.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), strengthScore, strengthScore * 3, new RewardImpl.DoNothingReward("You can't clear the entrance.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), strengthScore * 3, strengthScore * 6, new RewardImpl.AnimalReward(animalReward, "You find a baby " + species.ToString() + " in the cave.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), strengthScore * 6, int.MaxValue, new RewardImpl.AnimalReward(twoAnimals))
        };

        e.options.Add(new ExplorationEvent.Option("Attempt to clear the entrance.", variableAnimalReward));

        int trackingScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString());

        List <ExplorationCriteria> variableTrackingReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore, new RewardImpl.RandomAnimalPenalty()),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore, trackingScore * 3, new RewardImpl.DoNothingReward("You don't find another way in.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 3, trackingScore * 6, new RewardImpl.AnimalReward(animalReward)),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 6, int.MaxValue, new RewardImpl.AnimalReward(twoAnimals, "There were 2 of them in there.  You capture 2 baby " + species.ToString() + "."))
        };

        e.options.Add(new ExplorationEvent.Option("Attempt to find another way in.", variableTrackingReward));

        e.options.Add(new ExplorationEvent.Option("Walk away.", TraitFactory.Attribute.Tracking.ToString(), 0, new RewardImpl.DoNothingReward("You walk away."), new RewardImpl.DoNothingReward("You walk away.")));
        e.options.Add(
            new ExplorationEvent.Option("Send your climbing creature in.", TraitFactory.Attribute.Tracking.ToString(), trackingScore - 2, new RewardImpl.AnimalReward(animalReward, "Your climbing creature leads the way and finds a baby " + species.ToString() + "."),
                                        new RewardImpl.RandomAnimalPenalty("Even with a climbing creature to guide you, caves can still be hazzardous."), new List <string>()
        {
            TraitFactory.Traits.Climb.ToString()
        }));
        e.options.Add(
            new ExplorationEvent.Option("Dig through the rubble.", TraitFactory.Attribute.Strength.ToString(), strengthScore - 2, new RewardImpl.AnimalReward(animalReward, "You dig and dig until you find a baby " + species.ToString() + "."), new RewardImpl.DoNothingReward("You don't find anything."), new List <string>()
        {
            TraitFactory.Traits.Dig.ToString()
        }));
        return(e);
    }
Пример #4
0
    protected ExplorationEvent animalBabyFightMother(SpeciesFactory.Species species, string trumpOption)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        e.description = "You come across a baby " + species.ToString() + ", its mother is nearby.";
        e.options     = new List <ExplorationEvent.Option>();

        List <AnimalDef> twoAnimals = new List <AnimalDef>()
        {
            animalReward, animalReward
        };

        int fightScore    = animalReward.GetAttributeScore(TraitFactory.Attribute.Fighting.ToString());
        int trackingScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString());

        List <ExplorationCriteria> variableAnimalReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), int.MinValue, fightScore * 2, new RewardImpl.RandomAnimalPenalty("The mother " + species.ToString() + " slaughters one of your animals before retreting to safety with her baby.")),
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), fightScore * 2, fightScore * 2 + 1, new RewardImpl.DoNothingReward("The " + species.ToString() + " looks kinda scary, and you back off.")),
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), fightScore * 2 + 1, fightScore * 4, new RewardImpl.AnimalReward(animalReward, "You feel great about killing a mother " + species.ToString() + " and enslaving her child")),
            new ExplorationCriteria(TraitFactory.Attribute.Fighting.ToString(), fightScore * 4, int.MaxValue, new RewardImpl.AnimalReward(twoAnimals, "You defeat the mother " + species.ToString() + " and notice another second baby hiding behind her corpse.  You capture 2 baby " + species.ToString()))
        };

        List <ExplorationCriteria> variableTrackingReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore, new RewardImpl.RandomAnimalPenalty("You're not very quiet, but don't have to run faster than the " + species.ToString() + ".  You just have to run faster than the slowest animal in your party.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore, trackingScore * 2, new RewardImpl.DoNothingReward("You escape.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 2, trackingScore * 4, new RewardImpl.FoodReward(animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()), "After you escape you find " + animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()) + " food with your keen tracking skills")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 4, int.MaxValue, new RewardImpl.AnimalReward(animalReward, "You manage to grab the baby " + species.ToString() + " as you walk away without the mother even noticing"))
        };


        e.options.Add(new ExplorationEvent.Option("Grab it.  You are not afraid of a mama " + species.ToString() + ".", variableAnimalReward));
        e.options.Add(new ExplorationEvent.Option("Walk away quietly.", variableTrackingReward));

        if (trumpOption != null)
        {
            e.options.Add(
                new ExplorationEvent.Option("Because you have " + trumpOption + ", you can scare the mom away.", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.AnimalReward(animalReward), new RewardImpl.DoNothingReward("Nothing interesting happens."), new List <string>()
            {
                trumpOption
            }));
        }

        return(e);
    }
    protected ExplorationEvent babyIslandSwim(SpeciesFactory.Species species)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        e.description = "You come across a baby " + species.ToString() + " on an island.";
        e.options     = new List <ExplorationEvent.Option>();

        List <AnimalDef> twoAnimals = new List <AnimalDef>()
        {
            animalReward, animalReward
        };

        int strengthScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Strength.ToString());

        List <ExplorationCriteria> variableAnimalReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), int.MinValue, strengthScore, new RewardImpl.RandomAnimalPenalty("The current was too swift.")),
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), strengthScore, strengthScore * 2, new RewardImpl.DoNothingReward("The tree doesn't budge.")),
            new ExplorationCriteria(TraitFactory.Attribute.Strength.ToString(), strengthScore * 2, int.MaxValue, new RewardImpl.AnimalReward(animalReward, "You crosses the water and captured a baby " + species.ToString()))
        };

        e.options.Add(new ExplorationEvent.Option("There is a tree nearby, you can try to push it over.", variableAnimalReward));
        e.options.Add(new ExplorationEvent.Option("Walk away.", TraitFactory.Attribute.Tracking.ToString(), 0, new RewardImpl.DoNothingReward("You walk away."), new RewardImpl.DoNothingReward("You walk away.")));

        e.options.Add(
            new ExplorationEvent.Option("Because you have swim, you can reach the island and get the baby.", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.AnimalReward(animalReward), new RewardImpl.AnimalReward(animalReward), new List <string>()
        {
            TraitFactory.Traits.Swim.ToString()
        }));
        e.options.Add(
            new ExplorationEvent.Option("Because you have flying, you can reach the island and get the baby.", TraitFactory.Attribute.Fighting.ToString(), 0, new RewardImpl.AnimalReward(animalReward), new RewardImpl.AnimalReward(animalReward), new List <string>()
        {
            TraitFactory.Traits.Flying.ToString()
        }));
        return(e);
    }
Пример #6
0
    protected ExplorationEvent babyInATree(SpeciesFactory.Species species)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        e.description = "You come across a baby " + species.ToString() + " in a tree.";
        e.options     = new List <ExplorationEvent.Option>();

        List <AnimalDef> twoAnimals = new List <AnimalDef>()
        {
            animalReward, animalReward
        };

        int trackingScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString());

        List <ExplorationCriteria> variableAnimalReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore, new RewardImpl.RandomAnimalPenalty("You discover that falling from a tree can be fatal.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore, trackingScore * 2, new RewardImpl.DoNothingReward("You can't reach it.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 2, trackingScore * 5, new RewardImpl.AnimalReward(animalReward, "You 'rescue' the baby " + species.ToString() + ".  It will never have suffer the pains of freedom again.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 5, int.MaxValue, new RewardImpl.AnimalReward(twoAnimals, "There were 2 of them up there.  You capture 2 baby " + species.ToString() + "."))
        };

        e.options.Add(new ExplorationEvent.Option("Attempt to climb the tree to get it.", variableAnimalReward));
        e.options.Add(new ExplorationEvent.Option("Walk away.", TraitFactory.Attribute.Tracking.ToString(), 0, new RewardImpl.DoNothingReward("You walk away."), new RewardImpl.DoNothingReward("You walk away.")));
        e.options.Add(
            new ExplorationEvent.Option("Send your climbing creature after it.", TraitFactory.Attribute.Tracking.ToString(), 0, new RewardImpl.AnimalReward(animalReward, "Your climbing creature brings the baby " + species.ToString() + " down from the tree"), new RewardImpl.AnimalReward(animalReward), new List <string>()
        {
            TraitFactory.Traits.Climb.ToString()
        }));
        e.options.Add(
            new ExplorationEvent.Option("Send your flying creature after it.", TraitFactory.Attribute.Tracking.ToString(), 0, new RewardImpl.AnimalReward(animalReward, "Your flying creature brings the baby " + species.ToString() + " down from the tree"), new RewardImpl.AnimalReward(animalReward), new List <string>()
        {
            TraitFactory.Traits.Flying.ToString()
        }));
        return(e);
    }
Пример #7
0
    public static AnimalDef CreateDefForSpecies(SpeciesFactory.Species species, bool assignRandomTraits)
    {
        AnimalDef animalDef = new AnimalDef();

        switch (species)
        {
        case SpeciesFactory.Species.Cow:
            animalDef.SpeciesTrait = SpeciesFactory.createCow();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Lion:
            animalDef.SpeciesTrait = SpeciesFactory.createLion();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Turtle:
            animalDef.SpeciesTrait = SpeciesFactory.createTurtle();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Turkey:
            animalDef.SpeciesTrait = SpeciesFactory.createTurkey();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Lobster:
            animalDef.SpeciesTrait = SpeciesFactory.createLobster();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Wolf:
            animalDef.SpeciesTrait = SpeciesFactory.createWolf();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Bat:
            animalDef.SpeciesTrait = SpeciesFactory.createBat();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Bison:
            animalDef.SpeciesTrait = SpeciesFactory.createBison();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Bear:
            animalDef.SpeciesTrait = SpeciesFactory.createBear();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Bee:
            animalDef.SpeciesTrait = SpeciesFactory.createBee();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Crocodile:
            animalDef.SpeciesTrait = SpeciesFactory.createCrocodile();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Bulldog:
            animalDef.SpeciesTrait = SpeciesFactory.createBulldog();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Tiger:
            animalDef.SpeciesTrait = SpeciesFactory.createTiger();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Deer:
            animalDef.SpeciesTrait = SpeciesFactory.createDeer();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Bluejay:
            animalDef.SpeciesTrait = SpeciesFactory.createBluejay();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Cat:
            animalDef.SpeciesTrait = SpeciesFactory.createCat();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Alligator:
            animalDef.SpeciesTrait = SpeciesFactory.createAlligator();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.BaldEagle:
            animalDef.SpeciesTrait = SpeciesFactory.createBaldEagle();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Sheep:
            animalDef.SpeciesTrait = SpeciesFactory.createSheep();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Panda:
            animalDef.SpeciesTrait = SpeciesFactory.createPanda();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Fox:
            animalDef.SpeciesTrait = SpeciesFactory.createFox();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Elephant:
            animalDef.SpeciesTrait = SpeciesFactory.createElephant();
            animalDef.SizeTrait    = SizeFactory.createEnormous();
            break;

        case SpeciesFactory.Species.Dog:
            animalDef.SpeciesTrait = SpeciesFactory.createDog();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Chicken:
            animalDef.SpeciesTrait = SpeciesFactory.createChicken();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Gorilla:
            animalDef.SpeciesTrait = SpeciesFactory.createGorilla();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Owl:
            animalDef.SpeciesTrait = SpeciesFactory.createOwl();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Horse:
            animalDef.SpeciesTrait = SpeciesFactory.createHorse();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Frog:
            animalDef.SpeciesTrait = SpeciesFactory.createFrog();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Giraffe:
            animalDef.SpeciesTrait = SpeciesFactory.createGiraffe();
            animalDef.SizeTrait    = SizeFactory.createEnormous();
            break;

        case SpeciesFactory.Species.Moose:
            animalDef.SpeciesTrait = SpeciesFactory.createMoose();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Mouse:
            animalDef.SpeciesTrait = SpeciesFactory.createMouse();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Canary:
            animalDef.SpeciesTrait = SpeciesFactory.createCanary();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        case SpeciesFactory.Species.Pig:
            animalDef.SpeciesTrait = SpeciesFactory.createPig();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Hippo:
            animalDef.SpeciesTrait = SpeciesFactory.createHippo();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Donkey:
            animalDef.SpeciesTrait = SpeciesFactory.createDonkey();
            animalDef.SizeTrait    = SizeFactory.createLarge();
            break;

        case SpeciesFactory.Species.Monkey:
            animalDef.SpeciesTrait = SpeciesFactory.createMonkey();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Duck:
            animalDef.SpeciesTrait = SpeciesFactory.createDuck();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Snake:
            animalDef.SpeciesTrait = SpeciesFactory.createSnake();
            animalDef.SizeTrait    = SizeFactory.createSmall();
            break;

        case SpeciesFactory.Species.Penguin:
            animalDef.SpeciesTrait = SpeciesFactory.createPenguin();
            animalDef.SizeTrait    = SizeFactory.createMidsized();
            break;

        case SpeciesFactory.Species.Rhino:
            animalDef.SpeciesTrait = SpeciesFactory.createRhino();
            animalDef.SizeTrait    = SizeFactory.createHuge();
            break;

        case SpeciesFactory.Species.Rabbit:
            animalDef.SpeciesTrait = SpeciesFactory.createRabbit();
            animalDef.SizeTrait    = SizeFactory.createTiny();
            break;

        default:
            break;
        }

        List <BaseTrait> allTraits = new List <BaseTrait>();

        allTraits.Add(animalDef.SpeciesTrait);
        allTraits.Add(animalDef.SizeTrait);
        animalDef.Traits = TraitSelector.selectTraits(allTraits);
        return(animalDef);
    }
Пример #8
0
 public static AnimalDef CreateDefForSpecies(SpeciesFactory.Species species)
 {
     return(CreateDefForSpecies(species, true));
 }
Пример #9
0
    protected ExplorationEvent rescueFromQuicksand(SpeciesFactory.Species species, int numAttackers = 1)
    {
        ExplorationEvent e = new ExplorationEvent();

        AnimalDef animalReward = AnimalDefFactory.CreateDefForSpecies(species);

        int foodReward = animalReward.GetAttributeScore(TraitFactory.Attribute.Food.ToString()) * numAttackers;

        string foodString = "";

        if (numAttackers == 1)
        {
            e.description = "You see a " + species.ToString() + " trapped in the quicksand";
            foodString    = "You rescued the " + species.ToString() + " and harvest its meat to feed your animals";
        }
        else
        {
            e.description = "You see " + numAttackers + " " + species.ToString() + " trapped in the quicksand";
            foodString    = "You killed every last " + species.ToString() + " and make a meal of their corpses.  you collect a feast of " + foodReward + " food.";
        }

        string tameString = "";

        if (numAttackers == 1)
        {
            e.description = "You see a " + species.ToString() + " trapped in the quicksand";
            tameString    = "You rescued the " + species.ToString() + " and it joins you.";
        }
        else
        {
            e.description = "You see " + numAttackers + " " + species.ToString() + " trapped in the quicksand";
            tameString    = "You rescued every last " + species.ToString() + " and they join you.";
        }

        e.options = new List <ExplorationEvent.Option>();

        int trackingScore = Mathf.FloorToInt(animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString()) * (0.5f + numAttackers));
        //int trackingScore = animalReward.GetAttributeScore(TraitFactory.Attribute.Tracking.ToString());


        List <ExplorationCriteria> variableFoodReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore * 2, new RewardImpl.RandomAnimalPenalty()),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 2, trackingScore * 2 + 3, new RewardImpl.FoodPenalty(25,
                                                                                                                                                     "The quicksand nearly killed you and claimed some of your supplies.  You lost 25 food.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 2 + 3, int.MaxValue, new RewardImpl.FoodReward(foodReward, foodString))
        };

        List <ExplorationCriteria> variableRescueReward = new List <ExplorationCriteria>()
        {
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, trackingScore * 3, new RewardImpl.RandomAnimalPenalty()),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 3, trackingScore * 3 + 3, new RewardImpl.FoodPenalty(25,
                                                                                                                                                     "The quicksand nearly killed you and claimed some of your supplies.  You lost 25 food.")),
            new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), trackingScore * 3 + 3, int.MaxValue, new RewardImpl.AnimalReward(animalReward, tameString))
        };


        e.options.Add(new ExplorationEvent.Option("Your animals are hungry.  Let's try to get some meat.", variableFoodReward));
        e.options.Add(new ExplorationEvent.Option("The " + species.ToString() + " look like great new travel companions. Maybe if we rescue them, they will join our cause?", variableRescueReward));
        e.options.Add(new ExplorationEvent.Option("Do Nothing.",
                                                  new ExplorationCriteria(TraitFactory.Attribute.Tracking.ToString(), int.MinValue, int.MaxValue, new RewardImpl.DoNothingReward())
                                                  ));

        return(e);
    }
Пример #10
0
 protected ExplorationEvent animalBabyFightMother(SpeciesFactory.Species species)
 {
     return(animalBabyFightMother(species, null));
 }
Пример #11
0
 protected ExplorationEvent attackedBy(SpeciesFactory.Species species, int numAttackers)
 {
     return(attackedBy(species, numAttackers, null));
 }
 public GameObject createAnimal(SpeciesFactory.Species species)
 {
     return(createFromDef(AnimalDefFactory.CreateDefForSpecies(species)));
 }