public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (FamilyId.Length != 0) { hash ^= FamilyId.GetHashCode(); } if (ShardCount != 0) { hash ^= ShardCount.GetHashCode(); } if (Rarity != 0) { hash ^= Rarity.GetHashCode(); } if (oneTimeRewards_ != null) { hash ^= OneTimeRewards.GetHashCode(); } if (PageId.Length != 0) { hash ^= PageId.GetHashCode(); } if (unlockRequirements_ != null) { hash ^= UnlockRequirements.GetHashCode(); } hash ^= shardCounts_.GetHashCode(); if (StickerDisabled != false) { hash ^= StickerDisabled.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void EnableShardHunt(MT19337 rng, TalkRoutines talkroutines, ShardCount count) { int goal = 16; switch (count) { case ShardCount.Count16: goal = 16; break; case ShardCount.Count20: goal = 20; break; case ShardCount.Count24: goal = 24; break; case ShardCount.Count28: goal = 28; break; case ShardCount.Count32: goal = 32; break; case ShardCount.Count36: goal = 36; break; case ShardCount.Range16_24: goal = rng.Between(16, 24); break; case ShardCount.Range24_32: goal = rng.Between(24, 32); break; case ShardCount.Range16_36: goal = rng.Between(16, 36); break; } string shardName = ShardNames.PickRandom(rng); // Replace unused CANOE string and EarthOrb pointer with whatever we're calling the scavenged item. ItemsText[(int)Item.Shard] = shardName; // Replace the upper two tiles of the unlit orb with an empty and found shard. // These are at tile address $76 and $77 respectively. Put(0x37760, Blob.FromHex("001C22414141221CFFE3DDBEBEBEDDE3001C3E7F7F7F3E1CFFFFE3CFDFDFFFFF")); int ppu = 0x2043; ppu = ppu + (goal <= 24 ? 0x20 : 0x00); // Fancy shard drawing code, see 0E_B8D7_DrawShardBox.asm Put(0x3B87D, Blob.FromHex($"A9{ppu & 0xFF:X2}8511A9{(ppu & 0xFF00) >> 8:X2}8512A977A00048AD0220A5128D0620A51118692085118D0620900DAD0220E612A5128D0620A5118D062068A200CC3560D002A976C0{goal:X2}D001608D0720C8E8E006D0EB1890C1")); // Black Orb Override to check for shards rather than ORBs. BlackOrbChecksShardsCountFor(goal, talkroutines); // A little narrative overhaul. Blob intro = FF1Text.TextToStory(new string[] { "The Time Loop has reopened!", "", "The ORBS have been smashed!", "", "", "", $"The resulting {shardName}S were", "", "stolen and scattered around", "", "the world to distract while", "", "this new evil incubates....", "", "", "", "But The Light Warriors return!", "", $"They will need {goal} {shardName}S", "", "to restore the BLACK ORB and", "", "confront this new malevolence.", }); System.Diagnostics.Debug.Assert(intro.Length <= 208); Put(0x37F20, intro); InsertDialogs(new Dictionary <int, string>() { { 0x21, $"The {shardName}S coalesce to\nrestore the Black ORB.\n\nBrave Light Warriors....\nDestroy the Evil within!" }, // Black Orb Text { 0x2E, $"Ah, the Light Warriors!\n\nSo you have collected\nthe {shardName}S and restored\nthe BLACK ORB." }, { 0x2F, "Thus you've travelled\n2000 years into the past\nto try to stop me?\n\nStep forward then,\nto your peril!" }, { 0x30, "Oh, Light Warriors!\nSuch arrogant bravery.\n\nLet us see whom history\nremembers. En Garde!" }, }); }