コード例 #1
0
 public Unit_Fishman(Location loc, SG_Fishmen soc) : base(loc, soc)
 {
     hp         = 1;
     home       = loc;
     isMilitary = true;
     parentSG   = soc;
 }
コード例 #2
0
        public override void cast(Map map, Hex hex)
        {
            base.cast(map, hex);
            if (!castable(map, hex))
            {
                return;
            }

            Settlement raidTarget = null;
            SG_Fishmen receiver   = null;

            foreach (Location l in hex.location.getNeighbours())
            {
                if (l.soc is Society && l.settlement != null)
                {
                    raidTarget = l.settlement;
                }
                if (l.soc is SG_Fishmen)
                {
                    receiver = (SG_Fishmen)l.soc;
                }
            }
            double start = receiver.currentMilitary;

            receiver.currentMilitary  = Math.Min(receiver.currentMilitary + map.param.ability_fishmanRaidMilAdd, receiver.maxMilitary);
            receiver.temporaryThreat += map.param.ability_fishmanRaidTemporaryThreat;
            double delta = receiver.currentMilitary - start;

            map.world.prefabStore.popImgMsg("You call to the land, and enough land dweller slip into the sea to add " + (int)(delta + 0.4) + " military might to your Deep Ones.",
                                            map.world.wordStore.lookup("ABILITY_FISHMAN_CALL"));
        }
コード例 #3
0
        public override void turnTick(Location location)
        {
            if (location.settlement == null)
            {
                return;
            }
            if (location.soc == null || (location.soc is Society == false))
            {
                return;
            }

            SG_Fishmen target = null;

            foreach (SocialGroup sg in location.map.socialGroups)
            {
                if (sg is SG_Fishmen)
                {
                    target = (SG_Fishmen)sg;
                }
            }

            target.currentMilitary += location.map.param.ability_fishmanCultMilRegen;
            target.temporaryThreat += location.map.param.ability_fishmanCultTempThreat;

            if (location.person() != null)
            {
                foreach (ThreatItem item in location.person().threatEvaluations)
                {
                    if (item.group == target && item.temporaryDread < 100)
                    {
                        item.temporaryDread += location.map.param.ability_fishmanCultDread;
                    }
                }
            }
        }
コード例 #4
0
        public override void cast(Map map, Hex hex)
        {
            base.cast(map, hex);
            if (!castable(map, hex))
            {
                return;
            }

            foreach (Location l in hex.location.getNeighbours())
            {
                if (l.soc != null && (l.soc is SG_Fishmen))
                {
                    if (l.soc.getRel(hex.location.soc).state == DipRel.dipState.war)
                    {
                        continue;
                    }
                    map.declareWar(l.soc, hex.location.soc);
                    l.soc.threat_mult = map.param.dark_evilThreatMult;
                    l.soc.setName("Deep Ones");
                    SG_Fishmen deepOnes = (SG_Fishmen)l.soc;
                    deepOnes.hasAttacked = true;
                    map.world.prefabStore.popImgMsg(
                        "The Deep Ones rise from the ocean and begin war on " + hex.location.soc.getName() + ". They are now revealed to the world.",
                        map.world.wordStore.lookup("ABILITY_FISHMAN_WAR"));
                }
            }
        }
コード例 #5
0
        public override void cast(Map map, Hex hex)
        {
            base.cast(map, hex);
            if (!castable(map, hex))
            {
                return;
            }

            if (hex.location.soc != null && (hex.location.soc is SG_Fishmen))
            {
                SG_Fishmen flesh = (SG_Fishmen)hex.location.soc;
                flesh.warState = SG_UnholyFlesh.warStates.DEFEND;

                map.world.prefabStore.popImgMsg(
                    "The Deep Ones return to the sea, to rebuild their strength, and defend their sunken temples.",
                    map.world.wordStore.lookup("ABILITY_FISH_WITHDRAW"));

                foreach (Unit u in map.units)
                {
                    if (u is Unit_Fishman)
                    {
                        //Reset your tasks so you immediately retreat
                        if (u.task is Task_GoToLocationAgressively)
                        {
                            u.task = null;
                        }
                    }
                }
            }
        }
コード例 #6
0
        public override void cast(Map map, Hex hex)
        {
            base.cast(map, hex);
            if (!castable(map, hex))
            {
                return;
            }


            SG_Fishmen soc = null;

            foreach (SocialGroup sg in map.socialGroups)
            {
                if (sg is SG_Fishmen)
                {
                    soc = (SG_Fishmen)sg;
                }
            }
            if (soc == null)
            {
                map.socialGroups.Add(new SG_Fishmen(map, hex.location));
            }
            else
            {
                hex.location.soc = soc;
            }

            map.world.prefabStore.popImgMsg("You create a Deep One colony at " + hex.location.getName() + ". Deep Ones are stealthy, but need to raid the surface to build up numbers."
                                            + " Doing so will create temporary threat (which in turn will create some permanent threat), so be sure to distract the surface and to avoid drawing too much attention when the human nobles aren't busy.",
                                            map.world.wordStore.lookup("ABILITY_FISHMAN_LAIR"));
            hex.location.settlement = new Set_Fishman_Lair(hex.location);
        }