DoomRL > Pre-0.9.9

[E|93%|YASD] I was able to ENTER the Vault...

<< < (2/3) > >>

Tavana:

--- Code: ---If (Player.Inventory.ItemsCheck("homing phase device")==TRUE)
 TeleportSpawnChance = 20;
ElseIf (Player.Inventory.ItemsCheck("phase device")==TRUE)
 TeleportSpawnChance = 20+(Player.Inventory.Count("phase device")*5);
Else
 TeleportSpawnChance = 5;

--- End code ---

EDIT: This is why I only code at night. Code written in the morning never does what you think it will.

Aki:
O_o

What?

Tavana:
Basically: If you have a homing phase device and thereby a free trip out, there's a 20% change the teleport will spawn, so you don't have to waste it.

If you just have phase devices, then it's a 20% chance, plus 5% for every phase device you have. In other words, the more phase devices you have (and thereby the more likely it is that you could get out on your own) the more likely it is that you'll get a teleport.

And in all other cases, there's only a 5% chance of a teleport that you can't reach, because it's Doom.

Welcome to PseudoC++, where all the functions are made up, the ints are long, and the barstaff is above average.

Aki:
That's what I thought, but I was confused because i'd think that you'd have more of a chance to tele out if you had none O_o

Is that actually from the code or did you make it up? :P

Tavana:

--- Quote from: Aki on October 15, 2009, 03:21 ---That's what I thought, but I was confused because i'd think that you'd have more of a chance to tele out if you had none O_o
--- End quote ---

Kornel + Doom = You're screwed.


--- Quote from: Aki on October 15, 2009, 03:21 ---Is that actually from the code or did you make it up? :P

--- End quote ---

The above equation is from the source code. But DoomRL is still in FreePascal, so...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version