Ejemplo n.º 1
0
""" Clothing Objects for Game """

from pymark import flags, enum, module, properties, modifiers

Avaliable = flags("Merchandise", "Reward", "Bonus", "Secret")
Location = enum("BodyArmor", "Helmets", "Gloves", "Boots")

jacket = ["Explorer Jacket", "greatcoat_new",
          Avaliable.Merchandise | Avaliable.Reward, Location.BodyArmor, 
	      properties(cost = 214, weight = 5.7, protection = 11, full_body = True), 
          modifiers("Old", "Ragged", "Torn")]

chaps  = ["Chaps", "chaps",
          Avaliable.Merchandise | Avaliable.Bonus, Location.Boots, 
	      properties(cost = 23, weight = 1.1, protection = 2, full_body = False),
          modifiers("Wrapped", "Posh", "Battered")]

shirt  = ["Sailor Shirt", "sailor_shirt",
          Avaliable.Merchandise, Location.BodyArmor, 
	      properties(cost = 112, weight = 3.1, protection = 4, full_body = False),
          modifiers("Wet")]
	
pegleg = ["Peg Leg", "peg_leg_m",
          Avaliable.Secret, Location.Boots, 
	      properties(cost = 321, weight = 7.2, protection = 4, full_body = False),
          modifiers("Wonky", "New")]
Ejemplo n.º 2
0
""" My Favourite Pets - Another example """

from pymark import enum, module, struct

""" Constants """

Types = enum("Dog", "Horse", "Cat")
Toys = enum("String", "Mouse", "Brush", "Bone", "Ball")

Colors = struct(
    Brown = (94, 83, 51),
    White = (255, 255, 255),
    Ginger = (237, 133, 14),
)

""" Module """

pets = module(
  
  benny = struct(
    type = Types.Dog,
    name = "Benny Boos",
    color = Colors.Brown,
    toys = [Toys.Bone, Toys.Ball]
  ),

  roger = struct(
    type = Types.Horse,
    name = "Roger Horse",
    color = Colors.White,
    toys = [Toys.Brush, Toys.String]
Ejemplo n.º 3
0
""" Clothing Objects for Game """

from pymark import flags, enum, module, properties, modifiers

Avaliable = flags("Merchandise", "Reward", "Bonus", "Secret")
Location = enum("BodyArmor", "Helmets", "Gloves", "Boots")

jacket = [
    "Explorer Jacket", "greatcoat_new",
    Avaliable.Merchandise | Avaliable.Reward, Location.BodyArmor,
    properties(cost=214, weight=5.7, protection=11, full_body=True),
    modifiers("Old", "Ragged", "Torn")
]

chaps = [
    "Chaps", "chaps", Avaliable.Merchandise | Avaliable.Bonus, Location.Boots,
    properties(cost=23, weight=1.1, protection=2, full_body=False),
    modifiers("Wrapped", "Posh", "Battered")
]

shirt = [
    "Sailor Shirt", "sailor_shirt", Avaliable.Merchandise, Location.BodyArmor,
    properties(cost=112, weight=3.1, protection=4, full_body=False),
    modifiers("Wet")
]

pegleg = [
    "Peg Leg", "peg_leg_m", Avaliable.Secret, Location.Boots,
    properties(cost=321, weight=7.2, protection=4, full_body=False),
    modifiers("Wonky", "New")
]
Ejemplo n.º 4
0
""" My Favourite Pets - Another example """

from pymark import enum, module, struct

""" Constants """

Types = enum("Dog", "Horse", "Cat")
Toys = enum("String", "Mouse", "Brush", "Bone", "Ball")

Colors = struct(Brown=(94, 83, 51), White=(255, 255, 255), Ginger=(237, 133, 14))

""" Module """

pets = module(
    benny=struct(type=Types.Dog, name="Benny Boos", color=Colors.Brown, toys=[Toys.Bone, Toys.Ball]),
    roger=struct(type=Types.Horse, name="Roger Horse", color=Colors.White, toys=[Toys.Brush, Toys.String]),
    catherine=struct(type=Types.Cat, name="Catherine", color=Colors.Ginger, toys=[Toys.String, Toys.Mouse]),
)