public SeaDrakeGraphics(SeaDrake ow) : base(ow, false) { this.fish = ow; headDanglers = 6; neckDanglers = 8; wingDanglers = 18; this.danglers = new Dangler[headDanglers + neckDanglers + 2 * wingDanglers]; this.danglerSeeds = new int[this.danglers.Length]; this.danglerProps = new float[this.danglers.Length, 3]; this.danglerVals = new Dangler.DanglerProps(); for (int i = 0; i < this.danglers.Length; i++) { this.danglerSeeds[i] = UnityEngine.Random.Range(0, int.MaxValue); this.danglers[i] = new Dangler(this, i, UnityEngine.Random.Range(4, 12), 5f, 5f); this.danglerProps[i, 0] = Mathf.Pow(UnityEngine.Random.value, 0.6f); this.danglerProps[i, 1] = Mathf.Lerp(2f, 5f, UnityEngine.Random.value); this.danglerProps[i, 2] = UnityEngine.Random.value; float num = Mathf.Lerp(4f, 8f, UnityEngine.Random.value) * Mathf.Lerp(0.5f, 1.5f, UnityEngine.Random.value); for (int j = 0; j < this.danglers[i].segments.Length; j++) { this.danglers[i].segments[j].rad = Mathf.Lerp(Mathf.Lerp(1f, 0.5f, UnityEngine.Random.value), 0.5f + Mathf.Sin(Mathf.Pow(UnityEngine.Random.value, 2.5f) * 3.14159274f) * 0.5f, UnityEngine.Random.value) * num; this.danglers[i].segments[j].conRad = UnityEngine.Random.Range(0f, 1.3f); } } this.bodyParts = new BodyPart[6 + 2 + 16 + this.fish.iVars.whiskers * 2]; this.tail = new TailSegment[6]; for (int j = 0; j < this.tail.Length; j++) { this.tail[j] = new TailSegment(this, Mathf.Lerp(3f, 1f, (float)j / (float)(this.tail.Length - 1)), 15f, (j != 0) ? this.tail[j - 1] : null, 0.5f, 0.99f, 0.4f, false); this.bodyParts[j] = this.tail[j]; } this.wings = new TailSegment[2, 10]; for (int i = 0; i < 2; i++) { for (int j = 0; j < this.wings.GetLength(1); j++) { this.wings[i, j] = new TailSegment(this, Mathf.Lerp(3f, 1f, (float)j / (float)(this.wings.GetLength(1) - 1)), 15f, (j != 0) ? this.wings[i, j - 1] : null, 0.5f, 0.99f, 0.4f, false); this.bodyParts[8 + (8 * i) + j] = this.wings[i, j]; } } int seed = UnityEngine.Random.seed; UnityEngine.Random.seed = this.fish.iVars.whiskerSeed; this.whiskers = new GenericBodyPart[2, this.fish.iVars.whiskers]; this.whiskerDirections = new Vector2[this.fish.iVars.whiskers]; this.whiskerProps = new float[this.fish.iVars.whiskers, 5]; for (int k = 0; k < this.fish.iVars.whiskers; k++) { this.whiskers[0, k] = new GenericBodyPart(this, 1f, 0.6f, 0.9f, this.fish.bodyChunks[2]); this.whiskers[1, k] = new GenericBodyPart(this, 1f, 0.6f, 0.9f, this.fish.bodyChunks[2]); this.whiskerDirections[k] = Custom.DegToVec(Mathf.Lerp(4f, 80f, UnityEngine.Random.value)); this.whiskerProps[k, 0] = Mathf.Lerp(7f, 40f, Mathf.Pow(UnityEngine.Random.value, 2f)); this.whiskerProps[k, 1] = Mathf.Lerp(-1f, 0.5f, UnityEngine.Random.value); this.whiskerProps[k, 2] = Mathf.Lerp(5f, 720f, Mathf.Pow(UnityEngine.Random.value, 1.5f)) / this.whiskerProps[k, 0]; this.whiskerProps[k, 3] = UnityEngine.Random.value; this.whiskerProps[k, 4] = Mathf.Lerp(0.6f, 1.6f, Mathf.Pow(UnityEngine.Random.value, 2f)); this.bodyParts[8 + 16 + k * 2] = this.whiskers[0, k]; this.bodyParts[8 + 16 + k * 2 + 1] = this.whiskers[1, k]; } UnityEngine.Random.seed = seed; this.flippers = new GenericBodyPart[2]; for (int l = 0; l < 2; l++) { this.flippers[l] = new GenericBodyPart(this, 1f, 0.7f, 0.99f, this.fish.bodyChunks[1]); this.bodyParts[6 + l] = this.flippers[l]; } }
protected virtual void FinishEffect(Point3D p, Map map, Mobile from) { from.RevealingAction(); Server.Engines.Harvest.Fishing.FishingSkill(from, 11); int count = Utility.RandomMinMax(1, 3); int onBoat = 0; string monster = ""; Point3D SpawnAt = p; switch (Utility.Random(17)) { case 0: monster = "SeaHag"; SpawnAt = from.Location; onBoat = 1; break; case 1: monster = "WaterWeird"; break; case 2: monster = "SeaweedElemental"; break; case 3: monster = "Kraken"; break; case 4: monster = "GiantEel"; break; case 5: monster = "GiantSquid"; break; case 6: monster = "SeaSerpent"; break; case 7: monster = "SeaDrake"; break; case 8: monster = "EyeOfTheDeep"; break; case 9: monster = "Typhoon"; break; case 10: monster = "SteamElemental"; break; case 11: monster = "BoneSailor"; SpawnAt = from.Location; onBoat = 1; break; case 12: monster = "Trituns"; SpawnAt = from.Location; onBoat = 1; break; case 13: monster = "Shark"; break; case 14: monster = "GreatWhite"; break; case 15: monster = "Megalodon"; break; case 16: monster = "Calamari"; break; } for (int i = 0; map != null && i < count; ++i) { BaseCreature spawn = new SeaHag(); if (monster == "SeaHag") { spawn = new SeaHag(); } else if (monster == "WaterWeird") { spawn = new WaterWeird(); } else if (monster == "SeaweedElemental") { spawn = new SeaweedElemental(); } else if (monster == "Kraken") { spawn = new Kraken(); } else if (monster == "GiantEel") { spawn = new GiantEel(); } else if (monster == "GiantSquid") { spawn = new GiantSquid(); } else if (monster == "SeaSerpent") { spawn = new SeaSerpent(); } else if (monster == "SeaDrake") { spawn = new SeaDrake(); } else if (monster == "EyeOfTheDeep") { spawn = new EyeOfTheDeep(); } else if (monster == "Typhoon") { spawn = new Typhoon(); } else if (monster == "SteamElemental") { spawn = new SteamElemental(); } else if (monster == "BoneSailor") { spawn = new BoneSailor(); } else if (monster == "Shark") { spawn = new Shark(); } else if (monster == "GreatWhite") { spawn = new GreatWhite(); } else if (monster == "Megalodon") { spawn = new Megalodon(); } else if (monster == "Calamari") { spawn = new Calamari(); } else if (monster == "Trituns") { switch (Utility.Random(2)) { case 0: spawn = new TritunMage(); break; case 1: spawn = new Tritun(); break; } } Spawn(SpawnAt, map, spawn, onBoat); spawn.WhisperHue = 999; // SO TASK MANAGER DELETES THEM EVENTUALLY spawn.Combatant = from; } Delete(); }
public override void Realize() { if (realizedCreature != null) { return; } switch (creatureTemplate.TopAncestor().type) { case CreatureTemplate.Type.Slugcat: realizedCreature = new Player(this, world); break; case CreatureTemplate.Type.LizardTemplate: realizedCreature = new Lizard(this, world); break; case CreatureTemplate.Type.Fly: realizedCreature = new Fly(this, world); break; case CreatureTemplate.Type.Leech: realizedCreature = new Leech(this, world); break; case CreatureTemplate.Type.Snail: realizedCreature = new Snail(this, world); break; case CreatureTemplate.Type.Vulture: realizedCreature = new Vulture(this, world); break; case CreatureTemplate.Type.GarbageWorm: GarbageWormAI.MoveAbstractCreatureToGarbage(this, Room); realizedCreature = new GarbageWorm(this, world); break; case CreatureTemplate.Type.LanternMouse: realizedCreature = new LanternMouse(this, world); break; case CreatureTemplate.Type.CicadaA: realizedCreature = new Cicada(this, world, creatureTemplate.type == CreatureTemplate.Type.CicadaA); break; case CreatureTemplate.Type.Spider: realizedCreature = new Spider(this, world); break; case CreatureTemplate.Type.JetFish: realizedCreature = new JetFish(this, world); break; case (CreatureTemplate.Type)patch_CreatureTemplate.Type.SeaDrake: realizedCreature = new SeaDrake(this, world); break; case CreatureTemplate.Type.BigEel: realizedCreature = new BigEel(this, world); break; case CreatureTemplate.Type.Deer: realizedCreature = new Deer(this, world); break; case (CreatureTemplate.Type)patch_CreatureTemplate.Type.WalkerBeast: realizedCreature = new WalkerBeast(this, world); break; case CreatureTemplate.Type.TubeWorm: realizedCreature = new TubeWorm(this, world); break; case CreatureTemplate.Type.DaddyLongLegs: realizedCreature = new DaddyLongLegs(this, world); break; case CreatureTemplate.Type.TentaclePlant: if (creatureTemplate.type == CreatureTemplate.Type.TentaclePlant) { realizedCreature = new TentaclePlant(this, world); } else { realizedCreature = new PoleMimic(this, world); } break; case CreatureTemplate.Type.MirosBird: realizedCreature = new MirosBird(this, world); break; case CreatureTemplate.Type.TempleGuard: realizedCreature = new TempleGuard(this, world); break; case CreatureTemplate.Type.Centipede: case CreatureTemplate.Type.RedCentipede: case CreatureTemplate.Type.Centiwing: case CreatureTemplate.Type.SmallCentipede: realizedCreature = new Centipede(this, world); break; case CreatureTemplate.Type.Scavenger: realizedCreature = new Scavenger(this, world); break; case CreatureTemplate.Type.Overseer: realizedCreature = new Overseer(this, world); break; case CreatureTemplate.Type.VultureGrub: if (creatureTemplate.type == CreatureTemplate.Type.VultureGrub) { realizedCreature = new VultureGrub(this, world); } else if (creatureTemplate.type == CreatureTemplate.Type.Hazer) { realizedCreature = new Hazer(this, world); } break; case CreatureTemplate.Type.EggBug: realizedCreature = new EggBug(this, world); break; case CreatureTemplate.Type.BigSpider: case CreatureTemplate.Type.SpitterSpider: realizedCreature = new BigSpider(this, world); break; case CreatureTemplate.Type.BigNeedleWorm: if (creatureTemplate.type == CreatureTemplate.Type.SmallNeedleWorm) { realizedCreature = new SmallNeedleWorm(this, world); } else { realizedCreature = new BigNeedleWorm(this, world); } break; case CreatureTemplate.Type.DropBug: realizedCreature = new DropBug(this, world); break; } InitiateAI(); for (int i = 0; i < stuckObjects.Count; i++) { if (stuckObjects[i].A.realizedObject == null) { stuckObjects[i].A.Realize(); } if (stuckObjects[i].B.realizedObject == null) { stuckObjects[i].B.Realize(); } } }