Bläddra i källkod

Add special gear and new passwords

master
Noëlle 4 år sedan
förälder
incheckning
3e2cbac57a
2 ändrade filer med 127 tillägg och 94 borttagningar
  1. 63
    63
      gear.py
  2. 64
    31
      koboldgen.py

+ 63
- 63
gear.py Visa fil

@@ -803,69 +803,69 @@ gadgets = [
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 114, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 115, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 116, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 117, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 118, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 119, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 120, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 121, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
# {
# "id": 122, # int
# "name": "", # (f)string
# "description": "", # (f)string
# "reusable": False, # boolean
# "cursed": False # boolean
# },
{
"id": 114, # int
"name": "Bard's Lute", # (f)string
"description": "Once per nap, you can use the Lute to grant yourself either flying or invisibility for one minute.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 115, # int
"name": "Barbarian's Axe", # (f)string
"description": "You get +1 Body damage to any successful or mixed-success attack while wielding this weapon.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 116, # int
"name": "Evasive Ring", # (f)string
"description": "You can reduce any successful Body attack against you to a mixed success while you wear this ring.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 117, # int
"name": "Seven-League Boots", # (f)string
"description": "While wearing these boots, you can move twice as far as you normally could.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 118, # int
"name": "Bard's Lyre", # (f)string
"description": "Twice per nap, you can use the Lyre to grant yourself either flying or invisibility for one minute, or you can create a wall of fire or of wind that lasts for one minute and extends 30 feet in whatever straight line you choose.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 119, # int
"name": "Dragon Scale Mail", # (f)string
"description": "Once per nap, you can reduce any successful Body attack against you to a failure, OR three times per nap, you can reduce a mixed success to a failure. If you use this to reduce a mixed success to a failure, you can't use the first feature until you've taken a nap.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 120, # int
"name": "Shifting Cloak", # (f)string
"description": "Once per nap, you can reduce any successful Body attack against you to a failure. In addition, whether or not you've used this ability, you subtract 1 from any roll you make to avoid a Body attack.", # (f)string
"reusable": True, # boolean
"cursed": False # boolean
},
{
"id": 121, # int
"name": "Holy Mace", # (f)string
"description": "You deal 1 additional Body damage when you wield this weapon. Once per nap, if you strike an undead with this weapon, they must immediately make an Order+Body check - after they take the damage! - or immediately be destroyed.", # (f)string
"reusable": False, # boolean
"cursed": False # boolean
},
{
"id": 122, # int
"name": "Winged Cloak", # (f)string
"description": "While wearing this cloak, you move half again as far as you normally could, and twice per nap, you can grant yourself the ability to fly for one minute.", # (f)string
"reusable": False, # boolean
"cursed": False # boolean
},
{
"id": 123,
"name": "Shortbow of the Watch",

+ 64
- 31
koboldgen.py Visa fil

@@ -121,6 +121,10 @@ class Character:
{"id": 10, "name": "Cartographer"},
{"id": 11, "name": "Inventor"},
{"id": 12, "name": "Merchant"},
{"id": 119, "name": "Bard"},
{"id": 120, "name": "Sorcerer"},
{"id": 121, "name": "Cleric"},
{"id": 122, "name": "Rogue"},
{"id": 123, "name": "Ranger"},
{"id": 124, "name": "Barbarian"},
{"id": 125, "name": "Artificer"},
@@ -452,40 +456,69 @@ class Campaign:

def decode_key(self, pw):
densePwd = pw.replace(" ", "")
aBuiltin = densePwd[:12].upper()
builtins = ["PACKTACTICS!", "JUSTINBAILEY", "NARPASSWORD", "PACKTACTICS1", "PACKTACTICS2", "PACKTACTICS3"]
if len(densePwd) != 84 and (densePwd.upper() not in builtins):
if len(densePwd) != 84 and (aBuiltin not in builtins):
print("This password is not valid. If this is a password that this generator created, please email noelle@noelle.codes and let me know.")
sys.exit(0)
if densePwd[:12].upper() == "PACKTACTICS!" or densePwd[:12].upper() == "PACKTACTICS3":
# Create a campaign featuring the Season 3 Pack Tactics crew.
self.ship = Ship("Red", "Star", "is maneuverable & unarmored", "has a politician who thinks they're in charge of it")
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Niwri", 123, [3, 4, 4, 3], 123))
self.characters.append(Character("Zax", 124, [1, 6, 2, 5], 124))
self.characters.append(Character("Chroma", 125, [4, 2, 5, 3], 125))
self.characters.append(Character("Zenosha", 126, [2, 3, 5, 2], 126))
self.characters.append(Character("Snax", 127, [3, 4, 6, 1], 127))
# self.print_params()
# self.print_chars()
return
elif densePwd[:12].upper() == "JUSTINBAILEY":
# Create a random campaign, but everyone's Gadget is a leotard that somehow is also an environment suit
self.create_campaign(n=6, makeChars=True)
for c in self.characters:
c.gadget = {"id":127, "name": "The Bailey", "description": "A form-fitting leotard that somehow protects the wearer from all environmental effects except extreme heat - including vacuum and poison.", "reusable": True}
# self.print_params()
# self.print_chars()
return
elif densePwd[:12].upper() == "NARPASSWORD":
# Create a random campaign, but all the kobolds' stats are set to 6
self.create_campaign(n=6, makeChars=True)
for c in self.characters:
c.stats = [6,6,6,6]
# self.print_params()
# self.print_chars()
return
if aBuiltin in builtins:
if aBuiltin == "PACKTACTICS!" or aBuiltin == "PACKTACTICS3":
# Create a campaign featuring the Season 3 Pack Tactics crew.
self.ship = Ship("Red", "Star", "is maneuverable & unarmored", "has a politician who thinks they're in charge of it")
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Niwri", 123, [3, 4, 4, 3], 123))
self.characters.append(Character("Zax", 124, [1, 6, 2, 5], 124))
self.characters.append(Character("Chroma", 125, [4, 2, 5, 3], 125))
self.characters.append(Character("Zenosha", 126, [3, 4, 5, 2], 126))
self.characters.append(Character("Snax", 127, [3, 4, 6, 1], 127))
# self.print_params()
# self.print_chars()
return
elif aBuiltin == "PACKTACTICS1":
# Create a campaign featuring the Season 1 Pack Tactics crew.
self.ship = Ship()
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Daldain", 119, [3, 4, 5, 2], 114))
self.characters.append(Character("Gox", 124, [2, 5, 2, 5], 115))
self.characters.append(Character("Zeeli", 120, [4, 2, 5, 3], 116))
self.characters.append(Character("Sax", 122, [3, 3, 3, 3], 117))
# self.print_params()
# self.print_chars()
return
elif aBuiltin == "PACKTACTICS2":
# Create a campaign featuring the Season 2 Pack Tactics crew.
self.ship = Ship("Red", "Star", "is maneuverable & unarmored", "has a politician who thinks they're in charge of it")
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Daldain", 119, [4, 5, 5, 3], 118))
self.characters.append(Character("Gox", 124, [2, 6, 4, 5], 119))
self.characters.append(Character("Zeeli", 120, [3, 4, 6, 5], 120))
self.characters.append(Character("Marwyse", 121, [4, 4, 6, 3], 121))
self.characters.append(Character("Sax", 122, [5, 4, 4, 4], 122))
# self.print_params()
# self.print_chars()
return
elif aBuiltin == "JUSTINBAILEY":
# Create a random campaign, but everyone's Gadget is a leotard that somehow is also an environment suit
self.create_campaign(n=6, makeChars=True)
for c in self.characters:
c.gadget = {"id":127, "name": "The Bailey", "description": "A form-fitting leotard that somehow protects the wearer from all environmental effects except extreme heat - including vacuum and poison.", "reusable": True}
# self.print_params()
# self.print_chars()
return
elif aBuiltin == "NARPASSWORD":
# Create a random campaign, but all the kobolds' stats are set to 6
self.create_campaign(n=6, makeChars=True)
for c in self.characters:
c.stats = [6,6,6,6]
# self.print_params()
# self.print_chars()
return
numPwd = []
for c in densePwd:
numPwd.append(Campaign.ALPHABET.index(c))

Laddar…
Avbryt
Spara