Think I fixed it now.
where 100 is the amount of wood and 0 is intensity of the quest. Intensities are listed here:
The intensity is the last number, which in this case is 0. The amount is the result of the calculation before the comma.
Code: Select all
public static BodQuestType RandomBlacksmithQuest()
{
//common resources
switch(Utility.Random(Utility.Random(12)))
{
case 0: return new BodQuestType("Iron Ingots","IronIngot",5+(15*Utility.Random(21)),0);
case 1: return new BodQuestType("Iron Ingots","IronIngot",5+(25*Utility.Random(21)),7);
case 2: return new BodQuestType("Dull Copper Ingots","DullCopperIngot",5+(25*Utility.Random(21)),20);
case 3: return new BodQuestType("Shadow Iron Ingots","ShadowIronIngot",5+(25*Utility.Random(21)),28);
case 4: return new BodQuestType("Copper Ingots","CopperIngot",5+(25*Utility.Random(21)),35);
case 5: return new BodQuestType("Bronze Ingots","BronzeIngot",5+(25*Utility.Random(11)),48);
case 6: return new BodQuestType("Gold Ingots","GoldIngot",5+(25*Utility.Random(11)),65);
case 7: return new BodQuestType("Agapite Ingots","AgapiteIngot",5+(25*Utility.Random(6)),73);
case 8: return new BodQuestType("Verite Ingots","VeriteIngot",5+(25*Utility.Random(6)),88);
case 9: return new BodQuestType("Valorite Ingots","ValoriteIngot",5+(25*Utility.Random(6)),95);
}
//scales
switch(Utility.Random(20))
{
case 0: return new BodQuestType("Red Scales","RedScales",5+5*Utility.Random(20),100);
case 1: return new BodQuestType("Yellow Scales","YellowScales",2+Utility.Random(20),110);
case 2: return new BodQuestType("Black Scales","BlackScales",2+Utility.Random(20),120);
case 3: return new BodQuestType("Green Scales","GreenScales",2+Utility.Random(20),120);
case 4: return new BodQuestType("White Scales","WhiteScales",2+Utility.Random(20),130);
case 5: return new BodQuestType("Blue Scales","BlueScales",2+Utility.Random(20),140);
}
//rare resources
switch(Utility.Random(6))
{
case 0: return new BodQuestType("Perfect Emeralds","PerfectEmerald",2+Utility.Random(9),120);
case 1: return new BodQuestType("Dark Sapphires","DarkSapphire",2+Utility.Random(9),120);
case 2: return new BodQuestType("Turquoises","Turquoise",2+Utility.Random(9),120);
case 3: return new BodQuestType("Ecru Citrines","Ecru Citrine",2+Utility.Random(9),120);
case 4: return new BodQuestType("Fire Rubys","FireRuby",2+Utility.Random(9),120);
case 5: return new BodQuestType("Blue Diamonds","BlueDiamond",2+Utility.Random(9),120);
}
return new BodQuestType("Iron Ingots","IronIngot",5+(20*Utility.Random(20)),10);
}
public static BodQuestType RandomTailorQuest()
{
//common resources
switch(Utility.Random(Utility.Random(9)))
{
case 0: return new BodQuestType("Cut leather","Leather",5+(25*Utility.Random(21)),0);
case 1: return new BodQuestType("Cut spined leather","SpinedLeather",5+(25*Utility.Random(21)),10);
case 2: return new BodQuestType("Cut horned leather","HornedLeather",5+(25*Utility.Random(21)),20);
case 3: return new BodQuestType("Cut barbed leather","BarbedLeather",5+(25*Utility.Random(21)),40);
case 4: return new BodQuestType("Cut leather","Leather",500+(25*Utility.Random(21)),50);
case 5: return new BodQuestType("Cut spined leather","SpinedLeather",500+(25*Utility.Random(21)),70);
case 6: return new BodQuestType("Cut horned leather","HornedLeather",500+(25*Utility.Random(21)),80);
case 7: return new BodQuestType("Cut barbed leather","BarbedLeather",500+(25*Utility.Random(21)),100);
}
return new BodQuestType("Cut leather","Leather",5+(20*Utility.Random(20)),10);
}
public static BodQuestType RandomCarpenterQuest()
{
//common resources
switch(Utility.Random(Utility.Random(8)))
{
case 0: return new BodQuestType("Regular boards","Board",5+(25*Utility.Random(21)),10);
case 1: return new BodQuestType("Oak boards","Oakboard",5+(25*Utility.Random(21)),30);
case 2: return new BodQuestType("Ash Boards","AshBoard",5+(25*Utility.Random(11)),40);
case 3: return new BodQuestType("Yew Boards","YewBoard",5+(25*Utility.Random(11)),50);
case 4: return new BodQuestType("Bloodwood Boards","BloodwoodBoard",5+(25*Utility.Random(6)),65);
case 5: return new BodQuestType("Heartwood Board","HeartwoodBoard",5+(25*Utility.Random(6)),85);
case 6: return new BodQuestType("Frostwood Boards","FrostwoodBoard",5+(25*Utility.Random(6)),105);
}
//rare resources
switch(Utility.Random(6))
{
case 0: return new BodQuestType("Bark Fragments","BarkFragment",2+Utility.Random(9),100);
case 1: return new BodQuestType("Luminescent Fungus","Luminescent Fungi",2+Utility.Random(9),115);
case 2: return new BodQuestType("Switches","Switch",2+Utility.Random(9),115);
case 3: return new BodQuestType("Brilliant Ambers","BrilliantAmber",2+Utility.Random(9),115);
}
return new BodQuestType("Regular boards","Board",5+(20*Utility.Random(20)),10);
}