Bläddra i källkod

Add gadgets

master
Noëlle 4 år sedan
förälder
incheckning
4998de60e8
2 ändrade filer med 28 tillägg och 1 borttagningar
  1. 2
    0
      koboldfoot.html
  2. 26
    1
      koboldgen.py

+ 2
- 0
koboldfoot.html Visa fil

@@ -2,8 +2,10 @@

<div id="howtoplay">
<p class="head">Ultra-Quickplay Rules</p>
<p>Completing a task (making an attack, cleaning a surface, activating a device) is an Event. If you're the first person to say they're doing something, your Event goes first.</p>
<p>To complete a task, combine two of your stats (Order or Chaos + Brain or Body) and roll 2d6.<br>If you roll under, you succeed; over, you fail; hit the target number, you get a partial success.</p>
<p>If you take damage, temporarily reduce your Brain or Body stat by 1, depending on what kind of damage you took.<br>You can regain stats by taking a nap.</p>
<p>If you use a reusable gadget, you have to take a nap before you can use it again. If someone else hands you a reusable gadget, you have to take a nap before you can use it. (You can use non-reusable gadgets right away.)</p>
</div>

<div id="footer">

+ 26
- 1
koboldgen.py Visa fil

@@ -84,7 +84,7 @@ class Plot:
"id": 9,
"name": "elder gods hailing from the dark spaces between the stars",
"shortname": "gods",
"stats": [6,6,6,6],
"stats": [0,6,6,6],
},
{
"id": 10,
@@ -135,6 +135,20 @@ class Plot:


class Character:
GADGETS = [ {"name": "Awesome Dagger of Sneak(?) Attacks", "description": "Yell 'Sneak Attack!' to count a mixed-success Body attack as a success.", "reusable": True},
{"name": "Button of Uselessness", "description": f"This large, red button can be stuck onto any flat surface, horizontal, vertical, or otherwise. A short time after it has been placed, any character (friend or foe) nearby must succeed a Brains roll to avoid pressing the button. Pressing the button does nothing, but this action takes the place of anything that might otherwise be done during an Event if the Brains roll is failed. The button can be pressed {r.randint(1,6)} times before it breaks and no longer compels others to press it.", "reusable": False},
{"name": "Encyclopedia of Stuff I Totally Knew", "description": "Add 2 points to the target number of any uncontested Brains roll, or 1 point to the target number of a contested Brains roll.", "reusable": True},
{"name": "Medkit", "description": "Make a Brains/Order roll to restore 2 lost Body points, or 1 on a Mixed Success. If the character has medical training, restored Body points may be doubled.", "reusable": False},
{"name": "Potion of Healing", "description": "Restore 1 lost Body point. Using counts as an Event but no roll is needed unless it’s contested.", "reusable": False},
{"name": "Tinfoil Helm of Shielding", "description": "Count any Brains damage as a mixed success. If you take Body damage, roll 1d6; on a 6, the Helm is useless until you take a nap.", "reusable": True},
{"name": "Handy Toothbrush", "description": "Scrub the Space Gunk off whatever object you're interacting with to turn a mixed Order success to make that object work into a full success.", "reusable": True},
{"name": "Jar of ... Something", "description": "Throw it (Body/Chaos) at another character to make them spend an Event cleaning it off, or throw it at the floor to make a ten-foot circle of difficult terrain.", "reusable": False},
{"name": "Pocket Sand!", "description": "Yell 'Pocket Sand!' to count a successful Body attack against you as a mixed success.", "reusable": False},
{"name": "The Fabulous Grappling Hook", "description": "As an Event, instantly move 50 feet in any direction. (Make sure you have 50 feet available to move in or take 1 Body damage when you arrive short of that.)", "reusable": True},
{"name": "Pocket Accordion", "description": "Make a Brains/Order or Brains/Chaos roll. On a success, any nearby opponent has -1 Brains during their next event. On a failure, everybody nearby, including you, has -1 Brains on their next event.", "reusable": True},
{"name": "Huge Goggles", "description": "If you take Body damage, roll 1d6; on a 6, the lenses of the Goggles break until you take a nap.", "reusable": True},
]

def __init__(self):
self.name = ""
self.career = ""
@@ -144,6 +158,7 @@ class Character:
self.gen_name()
self.gen_stats()
self.gen_career()
self.gen_gadget()

def gen_name(self):
self.name = gen_name()
@@ -178,6 +193,9 @@ class Character:
def gen_career(self):
self.career = r.choice(["Soldier/Guard","Pilot","Medic","Mechanic","Politician","Spellcaster","Performer","Historian","Spy","Cook","Cartographer","Inventor","Merchant"])

def gen_gadget(self):
self.gadget = r.choice(Character.GADGETS)

def print_name(self, html=False):
if html:
charText = f"<h4>Name: {self.name} (Kobold {self.career})</h4>"
@@ -202,6 +220,12 @@ class Character:
f" <li>Body: {self.stats[3]}</li>\n"
f" </ul>\n"
f" </span>\n"
f" <br>\n"
f" <span class='koboldgadget'>\n"
f" {self.gadget['name']}<br>\n"
f" {self.gadget['description']}<br>\n"
f" {'Reusable' if self.gadget['reusable'] else ''}\n"
f" </span>"
f"</div>\n"
)
print(out)
@@ -211,6 +235,7 @@ class Character:
print(f"Chaos: {self.stats[1]}")
print(f"Brain: {self.stats[2]}")
print(f"Body: {self.stats[3]}")
print(f"Gadget: {self.gadget['name']} ({self.gadget['description']}{'- Reusable' if self.gadget['reusable'] else ''})")

class Ship:
def __init__(self):

Laddar…
Avbryt
Spara