public override void FinishParsingGetCommand() { ParseName(); if (ObjData.Name.Equals("all", StringComparison.OrdinalIgnoreCase)) { NextCommand.Cast <IGetCommand>().GetAll = true; } else if ((ActorRoom.Uid == 4 || ActorRoom.Uid == 20 || ActorRoom.Uid == 22) && ObjData.Name.IndexOf("torch", StringComparison.OrdinalIgnoreCase) >= 0) { gOut.Print("All torches are bolted to the wall and cannot be removed."); NextState = Globals.CreateInstance <IMonsterStartState>(); } else { ObjData.RecordWhereClauseList = new List <Func <IGameBase, bool> >() { r => r is IArtifact a && a.IsInRoom(ActorRoom), r => r is IArtifact a && a.IsEmbeddedInRoom(ActorRoom), r => r is IArtifact a && (a.IsCarriedByContainerContainerTypeExposedToCharacter(gEngine.ExposeContainersRecursively) || a.IsCarriedByContainerContainerTypeExposedToRoom(ActorRoom, gEngine.ExposeContainersRecursively)) }; ObjData.RecordNotFoundFunc = NextCommand.PrintCantVerbThat; ResolveRecord(false); } } }
public override void FinishParsingGetCommand() { ParseName(); if (ObjData.Name.Equals("all", StringComparison.OrdinalIgnoreCase)) { if (gGameState.GetNBTL(Friendliness.Enemy) > 0) { NextCommand.PrintEnemiesNearby(); NextState = Globals.CreateInstance <IStartState>(); } else { NextCommand.Cast <IGetCommand>().GetAll = true; } } else if (ActorRoom.Type == RoomType.Indoors && ObjData.Name.IndexOf("torch", StringComparison.OrdinalIgnoreCase) >= 0) { if (gGameState.GetNBTL(Friendliness.Enemy) > 0) { NextCommand.PrintEnemiesNearby(); NextState = Globals.CreateInstance <IStartState>(); } else { gOut.Print("They are bolted firmly to the walls."); NextState = Globals.CreateInstance <IMonsterStartState>(); } } else { ObjData.RecordWhereClauseList = new List <Func <IGameBase, bool> >() { r => r is IArtifact a && a.IsInRoom(ActorRoom), r => r is IArtifact a && a.IsEmbeddedInRoom(ActorRoom), r => r is IArtifact a && (a.IsCarriedByContainerContainerTypeExposedToCharacter(gEngine.ExposeContainersRecursively) || a.IsCarriedByContainerContainerTypeExposedToRoom(ActorRoom, gEngine.ExposeContainersRecursively)) }; ObjData.RecordNotFoundFunc = NextCommand.PrintCantVerbThat; ResolveRecord(false); } } }