Created
October 9, 2022 02:36
-
-
Save rvvvt/dbfee3e801822658b424cfb019a30ba0 to your computer and use it in GitHub Desktop.
random wand drop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void OnDeath(Container c) // (random chance) | |
{ | |
base.OnDeath(c); | |
if (1.0 > Utility.RandomDouble()) // 0.1=10% chance to drop | |
switch (Utility.Random(3)) | |
{ | |
case 0: c.DropItem(new WeaknessWand()); break; | |
case 1: c.DropItem(new ClumsyWand()); break; | |
case 2: c.DropItem(new FeebleWand()); break; | |
case 3: c.DropItem(new MagicArrowWand()); break; | |
case 4: c.DropItem(new HarmWand()); break; | |
case 5: c.DropItem(new HealWand()); break; | |
case 6: c.DropItem(new GreaterHealWand()); break; | |
case 7: c.DropItem(new FireballWand()); break; | |
case 8: c.DropItem(new LightningWand()); break; | |
case 9: c.DropItem(new IDWand()); break; | |
case 10: c.DropItem(new ManaDrainWand()); break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment