• 1 Post
  • 1 Comment
Joined 2 years ago
cake
Cake day: August 10th, 2023

help-circle
  • On GitHub, I don’t see anything in the changeWand method of the Transmutation scroll’s code limiting it to not generate a Regrowth wand. And the item Generate class sets the default probabilities to the same for all wands. Is there somewhere else this could be affected? I looked around, but couldn’t find any comments indicating Regrowth wand was blocked in Transmutation wand generation. I guess I’m just (un)lucky with the RNG in this particular context. 😅

    private static Wand changeWand( Wand w ) {
    	Wand n;
    	do {
    		n = (Wand)Generator.randomUsingDefaults( Generator.Category.WAND );
    	} while ( Challenges.isItemBlocked(n) || n.getClass() == w.getClass());
    	
    	n.level( 0 );
    	int level = w.trueLevel();
    	n.upgrade( level );
    
    	n.levelKnown = w.levelKnown;
    	n.curChargeKnown = w.curChargeKnown;
    	n.cursedKnown = w.cursedKnown;
    	n.cursed = w.cursed;
    	n.curseInfusionBonus = w.curseInfusionBonus;
    	n.resinBonus = w.resinBonus;
    
    	n.curCharges =  w.curCharges;
    	n.updateLevel();
    	
    	return n;
    }
    

    … WAND.classes = new Class<?>[]{ WandOfMagicMissile.class, WandOfLightning.class, WandOfDisintegration.class, WandOfFireblast.class, WandOfCorrosion.class, WandOfBlastWave.class, WandOfLivingEarth.class, WandOfFrost.class, WandOfPrismaticLight.class, WandOfWarding.class, WandOfTransfusion.class, WandOfCorruption.class, WandOfRegrowth.class }; WAND.defaultProbs = new float[]{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };