public override void TileProc(int aX, int aY, ref bool refContinue) { NWField f = Field; Step(aX, aY); if (f.IsBarrier(aX, aY)) { refContinue = false; } else { BaseTile tile = f.GetTile(aX, aY); NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null) { string cSign = c.Entry.Sign; if (cSign.Equals("Mudman") || cSign.Equals("MudFlow")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Mud); } else { if (cSign.Equals("LavaFlow")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Lava); } else { if (cSign.Equals("Jagredin") || cSign.Equals("LiveRock")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Rubble); } else { if (cSign.Equals("SandForm")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Quicksand); } else { if (cSign.Equals("WateryForm")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Water); } else { if (c.State == CreatureState.Undead) { c.Death("", null); } } } } } } } } }
public override void TileProc(int aX, int aY, ref bool refContinue) { NWField f = Field; Step(aX, aY); if (f.IsBarrier(aX, aY)) { refContinue = false; } else { NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null && c.HasAffect(EffectID.eid_Death)) { RaceID race = c.Entry.Race; if (race == RaceID.crDefault || race == RaceID.crHuman) { if (c.IsPlayer) { c.Death(BaseLocale.GetStr(RS.rs_KilledByDeathRay), null); } else { c.Death(BaseLocale.Format(RS.rs_TheXIsDestroyed, new object[] { c.Name }), null); } } } } }
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 })); } } }
public override void TileProc(int aX, int aY, ref bool aContinue) { NWField fld = Field; NWTile tile = (NWTile)fld.GetTile(aX, aY); Step(aX, aY); if (fld.IsBarrier(aX, aY)) { if (tile.ForeBase == PlaceID.pid_Tree) { tile.Foreground = PlaceID.pid_Undefined; fld.AddCreature(aX, aY, GlobalVars.nwrDB.FindEntryBySign("Faleryn").GUID); } aContinue = false; } else { NWCreature c = (NWCreature)fld.FindCreature(aX, aY); if (c != null) { EffectsFactory.e_Transformation(EffectID.eid_Transformation, c, null, ItemState.is_Normal, InvokeMode.im_ItSelf, null); } } }
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 void LineProc(int x, int y, ref bool isContinue) { NWField f = ACreature.CurrentField; if (f.IsBarrier(x, y)) { isContinue = false; } else { NWCreature cr = (NWCreature)f.FindCreature(x, y); isContinue = (cr == null) || (cr.Equals(AEnemy) || cr.Equals(ACreature)); } }
public override void TileProc(int aX, int aY, ref bool aContinue) { NWField f = Field; if (f.IsBarrier(aX, aY)) { aContinue = false; } else { NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null) { EffectsFactory.FireHit(EffectID.eid_FireVision, Creature, c, RandomHelper.GetBoundedRnd(2, 40)); } aContinue = (c == null); } }
public override void TileProc(int aX, int aY, ref bool refContinue) { NWField f = Field; Step(aX, aY); if (f.IsBarrier(aX, aY)) { refContinue = false; } else { NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null && c.HasAffect(EffectID.eid_Stoning)) { c.AddEffect(EffectID.eid_Stoning, ItemState.is_Normal, EffectAction.ea_Persistent, true, ""); } } }
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); } } } } }
public void LineProc(int aX, int aY, ref bool aContinue) { NWField f = (NWField)ACreature.CurrentMap; if (f.IsBarrier(aX, aY)) { aContinue = false; } else { NWCreature cr = (NWCreature)f.FindCreature(aX, aY); if (cr == null) { aContinue = true; } else { aContinue = (cr.Equals(AEnemy) || cr.Equals(ACreature)); } } }
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; } }
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 tmp = BaseLocale.GetStr(StaticData.dbPlaces[5].NameRS); GlobalVars.nwrWin.ShowText(Creature, BaseLocale.Format(RS.rs_TheXIsFrozen, new object[] { tmp })); } refContinue = false; } else { NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null && c.HasAffect(EffectID.eid_Ice)) { c.AddEffect(EffectID.eid_Ice, ItemState.is_Normal, EffectAction.ea_Persistent, false, BaseLocale.GetStr(RS.rs_YouAreFrozen)); Effect e = c.Effects.FindEffectByID(EffectID.eid_Ice); if (e != null && e.Magnitude >= 30) { string tmp; if (c.IsPlayer) { tmp = BaseLocale.GetStr(RS.rs_EncasedInIce); } else { tmp = BaseLocale.Format(RS.rs_TheXIsFrozen, new object[] { c.Name }); } c.Death(tmp, null); } } } }
public static void DrawSymTile(NWGameSpace space, NWField field, int px, int py, BaseScreen screen, ExtRect mapRect, ExtRect viewRect, ImageList symImages) { NWTile place = (NWTile)field.GetTile(px, py); int sx = viewRect.Left + 8 * (px + 1); int sy = viewRect.Top + 10 * (py + 1); if (place != null && !place.EmptyStates) { ushort bg = place.Background; ushort fg = place.Foreground; fg = PtTransDoor(place); short op = space.GetTileBrightness(field, place, true); symImages.DrawImage(screen, sx, sy, GetSymImageIndex(bg), op); int fog = place.FogID; if (fog != PlaceID.pid_Undefined) { symImages.DrawImage(screen, sx, sy, GetSymImageIndex((ushort)PlaceID.pid_Fog), op); } else { if (fg != PlaceID.pid_Undefined) { bool trap = field.IsTrap(px, py); if (!trap || (trap && (place.Trap_Discovered || GlobalVars.Debug_Divinity))) { symImages.DrawImage(screen, sx, sy, GetSymImageIndex(fg), op); } } } if (!field.IsBarrier(px, py) && mapRect.IsBorder(px, py)) { symImages.DrawImage(screen, sx, sy, StaticData.dbSymbols[(int)GetBorderSymbol(px, py)].ImageIndex, op); } } }
public override void TileProc(int aX, int aY, ref bool aContinue) { NWField fld = Field; NWTile tile = (NWTile)fld.GetTile(aX, aY); Step(aX, aY); if (fld.IsBarrier(aX, aY)) { if (tile.ForeBase == PlaceID.pid_Tree) { tile.Foreground = PlaceID.pid_Undefined; } aContinue = false; } else { NWCreature c = (NWCreature)fld.FindCreature(aX, aY); if (c != null) { EffectsFactory.FireHit(EffectID.eid_Fire, Creature, c, RandomHelper.GetBoundedRnd(6, 21)); } } }
public override void TileProc(int aX, int aY, ref bool aContinue) { NWField f = Field; Step(aX, aY); if (f.IsBarrier(aX, aY)) { aContinue = false; } else { NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null) { RaceID race = c.Entry.Race; if (race == RaceID.crDefault || race == RaceID.crHuman) { c.ClearAbilities(); c.ClearSkills(); } } } }
private void LineProc(int x, int y, ref bool refContinue) { Steps++; NWGameSpace space = Creature.Space; if (!Map.IsValid(x, y)) { bool gpChanged = false; int fx = Map.Coords.X; int fy = Map.Coords.Y; int px = x; int py = y; GlobalPosition gpi = new GlobalPosition(fx, fy, px, py, gpChanged); gpi.CheckPos(); fx = gpi.Fx; fy = gpi.Fy; px = gpi.Px; py = gpi.Py; gpChanged = gpi.GlobalChanged; NWLayer layer = Map.Layer; if (fx >= 0 && fx != layer.W && fy >= 0 && fy != layer.H && gpChanged) { Map.Items.Extract(ProjectileItem); Map = space.GetField(Creature.LayerID, fx, fy); Map.Items.Add(ProjectileItem, false); ProjectileItem.SetPos(px, py); } refContinue = false; } else { if (Map.IsBarrier(x, y)) { Hit = HIT_BARRIER; refContinue = false; } else if (Steps > Range) { Hit = HIT_NONE; refContinue = false; } else { NWCreature target = (NWCreature)Map.FindCreature(x, y); if (target != null && !target.Equals(Creature)) { Creature.AttackTo(Kind, target, Weapon, ProjectileItem); ProjectileItem.SetPos(x, y); Hit = HIT_BODY; ProjectileItem.ApplyEffects(target, InvokeMode.im_Use, null); refContinue = false; } if (refContinue) { ProjectileItem.SetPos(x, y); } } } if (space.Player.IsSeen(x, y, false)) { space.RepaintView(25); } }
public override void TileProc(int aX, int aY, ref bool refContinue) { NWField f = Field; if (f.IsBarrier(aX, aY)) { refContinue = false; } else { NWTile tile = (NWTile)f.GetTile(aX, aY); int bg = tile.BackBase; if (bg == PlaceID.pid_Mud || bg == PlaceID.pid_Rubble) { tile.Background = PlaceID.pid_Ground; } else { tile.Background = dbTransmutatedList[RandomHelper.GetRandom(2)]; } NWCreature c = (NWCreature)f.FindCreature(aX, aY); if (c != null) { string cSign = c.Entry.Sign; if (cSign.Equals("Mudman") || cSign.Equals("MudFlow")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Mud); } else { if (cSign.Equals("LavaFlow")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Lava); } else { if (cSign.Equals("Jagredin") || cSign.Equals("LiveRock")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Rubble); } else { if (cSign.Equals("SandForm")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Quicksand); } else { if (cSign.Equals("WateryForm")) { EffectsFactory.Deanimate(f, c, tile, PlaceID.pid_Water); } } } } } } } }