Exemplo n.º 1
0
        public override void TileProc(int aX, int aY, ref bool refContinue)
        {
            NWField f    = Field;
            NWTile  tile = (NWTile)f.GetTile(aX, aY);

            Step(aX, aY);

            if (f.IsBarrier(aX, aY))
            {
                if (tile.ForeBase == PlaceID.pid_Tree)
                {
                    tile.Foreground = PlaceID.pid_DeadTree;
                    string nm = BaseLocale.GetStr(StaticData.dbPlaces[5].NameRS);
                    GlobalVars.nwrWin.ShowText(Creature, BaseLocale.Format(RS.rs_TheXIsMelted, new object[] { nm }));
                }
                refContinue = false;
            }
            else
            {
                NWCreature c = (NWCreature)f.FindCreature(aX, aY);
                if (c != null && c.HasAffect(EffectID.eid_Flaying))
                {
                    c.ApplyDamage(RandomHelper.GetBoundedRnd(13, 36), DamageKind.dkRadiation, null, BaseLocale.Format(RS.rs_TheXIsMelted, new object[] { c.Name }));
                }
            }
        }
Exemplo n.º 2
0
        public override void TileProc(int aX, int aY, ref bool refContinue)
        {
            NWField f = Field;

            if (f.IsBarrier(aX, aY))
            {
                refContinue = false;
            }
            else
            {
                Step(aX, aY);

                NWCreature c = (NWCreature)f.FindCreature(aX, aY);
                if (c != null)
                {
                    int val = RandomHelper.GetBoundedRnd(25, 40);
                    if (c.HPCur - val < 0)
                    {
                        val = c.HPCur;
                    }
                    c.ApplyDamage(val, DamageKind.dkPhysical, null, "");
                    if (Creature.Items.FindByCLSID(GlobalVars.iid_SoulTrapping_Ring) == null)
                    {
                        Creature.HPCur = Creature.HPCur + val;
                    }
                    // TODO: messages!!!
                }
                refContinue = (c == null);
            }
        }
        public override void TileProc(int aX, int aY, ref bool aContinue)
        {
            NWField fld = Field;

            Step(aX, aY);

            if (fld.IsBarrier(aX, aY))
            {
                aContinue = false;
            }
            else
            {
                NWCreature c = (NWCreature)fld.FindCreature(aX, aY);
                aContinue = true;
                if (c != null)
                {
                    if (c.HasAffect(EffID))
                    {
                        MNXRange dmg = EffectsData.dbEffects[(int)EffID].Damage;
                        c.ApplyDamage(RandomHelper.GetBoundedRnd(dmg.Min, dmg.Max), DmgKind, null, "");
                    }
                    if (EffID == EffectID.eid_Slinn_Gout)
                    {
                        c.Luck--;
                    }
                    else
                    {
                        if (EffID == EffectID.eid_Ellegiant_Throw)
                        {
                            aContinue = false;
                            Item item = new Item(GameSpace.Instance, fld);
                            item.CLSID = GlobalVars.nwrDB.FindEntryBySign("Boulder").GUID;
                            item.Count = 1;
                            item.SetPos(aX, aY);
                            item.Owner = fld;
                            fld.Items.Add(item, false);
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        public override void TileProc(int aX, int aY, ref bool aContinue)
        {
            NWCreature self = Creature;
            NWField    f    = Field;

            if (f.IsBarrier(aX, aY))
            {
                aContinue = false;
            }
            else
            {
                NWCreature c = (NWCreature)f.FindCreature(aX, aY);
                if (c != null)
                {
                    c.ApplyDamage(RandomHelper.GetBoundedRnd(9, 17), DamageKind.dkPhysical, null, "");
                }
                else
                {
                    self.CheckTile(false);
                    self.SetPos(aX, aY);
                    self.CheckTile(true);

                    Effect ef = self.Effects.FindEffectByID(EffectID.eid_PitTrap);
                    if (ef != null)
                    {
                        self.Effects.Remove(ef);
                    }
                    else
                    {
                        ef = self.Effects.FindEffectByID(EffectID.eid_Quicksand);
                        if (ef != null)
                        {
                            self.Effects.Remove(ef);
                        }
                    }
                    GlobalVars.nwrWin.ShowText(self, BaseLocale.GetStr(RS.rs_YouPullForward));
                }
                aContinue = false;
            }
        }