Editing Cave of the Nadir (Guide)/Script

From Fallen London Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
<code>
 
<code>
# -*- coding: utf-8 -*-
+
-*- coding: utf-8 -*-
"""
+
"""
Created on Mon May  1 09:05:19 2023
+
Created on Mon May  1 09:05:19 2023
+
 
@author: Gyro
+
@author: Gyro
"""
+
"""
+
 
import random
+
import random
+
 
+
 
 
    
 
    
def drawCard(deck):
+
def drawCard(deck):
 
   newCardName = random.choice(list(deck.keys()))
 
   newCardName = random.choice(list(deck.keys()))
 
   newCard = deck.pop(newCardName)
 
   newCard = deck.pop(newCardName)
 
   return [newCardName] + newCard
 
   return [newCardName] + newCard
+
 
def playCard(deck, cardNumber,currentHand, echoes, Irrigo):
+
def playCard(deck, cardNumber,currentHand, echoes, Irrigo):
 
   playedCard = currentHand.pop(cardNumber)
 
   playedCard = currentHand.pop(cardNumber)
 
   deck[playedCard[0]] = playedCard[1:3]
 
   deck[playedCard[0]] = playedCard[1:3]
Line 23: Line 23:
 
   return [echoes, Irrigo]
 
   return [echoes, Irrigo]
 
    
 
    
+
 
def caveTrip():
+
def caveTrip():
 
   Cards = {
 
   Cards = {
 
       "Cardgame": [.6,1],
 
       "Cardgame": [.6,1],
Line 47: Line 47:
 
       "woods": [36.5,2]
 
       "woods": [36.5,2]
 
       }
 
       }
+
 
+
 
 
   Nightmares = 6
 
   Nightmares = 6
+
 
 
   if Nightmares < 6:
 
   if Nightmares < 6:
 
       Cards.pop("Dream6")
 
       Cards.pop("Dream6")
Line 78: Line 78:
 
       actions += 1
 
       actions += 1
 
   epa = echoes/actions
 
   epa = echoes/actions
   return epa  
+
   return epa
+
 
sample = []
+
sample = []
for i in range(1000000):
+
for i in range(1000000):
 
   sample += [caveTrip()]
 
   sample += [caveTrip()]
 
 
</code>
 
</code>

Please note that all contributions to Fallen London Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Fallen London Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)