Advertisement
Kovitikus

Untitled

Aug 16th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.62 KB | None | 0 0
  1. """
  2. Traceback (most recent call last):
  3.  File "d:\muddev\evennia\evennia\commands\cmdhandler.py", line 591, in _run_command
  4.    ret = cmd.func()
  5.  File ".\commands\combat_cmds.py", line 71, in func
  6.    self.caller.combat.attack(target, damage_type, 'staves', 'swat')
  7.  File "d:\muddev\hecate\world\combat_handler.py", line 118, in attack
  8.    attacker_desc, target_desc, others_desc = build_skill_str.create_attack_desc(attacker, target,
  9. skillset, skill, damage_type, damage_tier, body_part, hit)
  10.  File "d:\muddev\hecate\world\build_skill_str.py", line 21, in create_attack_desc
  11.    a_name = prop_name(attacker)
  12.  File "d:\muddev\hecate\world\generic_str.py", line 52, in proper_name
  13.    name = char.key.cap
  14. AttributeError: 'str' object has no attribute 'cap'
  15.  
  16. An untrapped error occurred.
  17. (Traceback was logged 19-08-16 07:22:22-04).
  18. """
  19.  
  20. cap = 'capitalize'
  21. vowels = ['a', 'e', 'i', 'o', 'u']
  22.  
  23. consonant_vowels = ['amazigh', 'euboean', 'eucharist', 'eumenides', 'eurasian', 'euro-american', 'europe',
  24. 'european', 'eusebius', 'oaxaca', 'ouija', 'ucalegon', 'uclaf', 'udale',
  25. 'udall', 'udy', 'ueberroth', 'uganda', 'uinita', 'ukase', 'ukie', 'ukraine', 'ukrainian', 'ullyses', 'unakas',
  26. 'uniate', 'unix', 'uranus', 'usanian', 'usonian', 'utah', 'utahn', 'utonian', 'esclop', 'eucalyptus', 'eucatastrophe',
  27. 'euchologion', 'euchre', 'euclidianness', 'eudaemon', 'eudemonia', 'eugarie', 'eugenesis', 'eugenics', 'eugenist',
  28. 'eugeny', 'euglena', 'eukaryote', 'eulachon', 'eulogy', 'eunoia', 'eunuch', 'euouae', 'euphemism', 'euphoria',
  29. 'euphoriant', 'eureka', 'euro', 'eustasy', 'eustress', 'eutectic', 'euth', 'euthanasia', 'eutripsia', 'ewe', 'ewer',
  30. 'latmul', 'once', 'oncer', 'one', 'onesie', 'ouabain', 'ubac', 'uberty', 'ubication', 'ubicity', 'ubiety', 'ubiquity',
  31. 'udometer', 'uey', 'ufo', 'ufologist', 'ufology', 'uke', 'ukelele', 'ukulele', 'ululate', 'ululation', 'unanimity',
  32. 'unanimous', 'unary', 'uni', 'unicameral', 'unicorn', 'unicycle', 'unidirection', 'unidirectional', 'unidirectionality',
  33. 'uniform', 'uniformitarianism', 'unify', 'unigeniture', 'union', 'unique', 'uniquity', 'unisex', 'unison', 'unit', 'unite',
  34. 'unity', 'univalence', 'univalent', 'universalism', 'universe', 'university', 'univocal', 'upas', 'upsilon', 'uraeus',
  35. 'ural', 'uranism', 'uranist', 'uranium', 'uranophobia', 'urea', 'ureter', 'ureteroureterostomy', 'urethra', 'uridine',
  36. 'urinal', 'urinalysis', 'urine', 'urology', 'uropygium', 'urus', 'usability', 'usage', 'use', 'user', 'using', 'usual',
  37. 'usufruct', 'usufruction', 'usufructuary', 'usurer', 'usuress', 'usurp', 'usurper', 'usurping', 'usury', 'ute', 'utensil',
  38. 'uterus', 'utile', 'utilitarian', 'utility', 'utopia', 'utopographer', 'utricle', 'uvarovite', 'uvas', 'uvea', 'uvula',
  39. 'uvular', 'zzxjoanw']
  40.  
  41. def article(word):
  42.     word.lower()
  43.  
  44.     if word[0] in vowels:
  45.         article = 'an'
  46.     elif word in consonant_vowels:
  47.         article = 'a'
  48.     else:
  49.         article = 'a'
  50.     return article
  51.  
  52. def pronoun(char):
  53.     if not char.attributes.has('figure'):
  54.         possessive = 'its'
  55.         singular_subject = 'it'
  56.         singular_object = 'it'
  57.     elif char.db.figure['gender'] == 'male':
  58.         possessive = 'his'
  59.         singular_subject = 'he'
  60.         singular_object = 'him'
  61.     elif char.db.figure['gender'] == 'female':
  62.         possessive = 'hers'
  63.         singular_subject = 'she'
  64.         singular_object = 'her'
  65.     return possessive, singular_subject, singular_object
  66.  
  67. def proper_name(char):
  68.     if not char.attributes.has('figure'):
  69.         name = char.key
  70.     elif char.db.figure['gender'] == 'male' or 'female':
  71.         name = char.key.cap
  72.     return name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement