SHARE
TWEET

attack string

Kovitikus Aug 20th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from world import generic_str
  2.  
  3. article = generic_str.article
  4. pronoun = generic_str.pronoun
  5. prop_name = generic_str.proper_name
  6.                    
  7. def create_attack_desc(attacker, target, skillset, skill, weapon, damage_type, damage_tier, body_part, hit):
  8.     cap = str.capitalize
  9.  
  10.     wound_tier = {'slash': ['shallow cut', 'cut', 'deep cut', 'severe cut', 'devastating cut'],
  11.                 'pierce': ['faint wound', 'puncture', 'deep puncture', 'severe puncture', 'gaping wound'],
  12.                 'bruise': ['small bruise', 'bruise', 'ugly bruise', 'major bruise', 'fracture']}
  13.     attack_wound = wound_tier[damage_type][damage_tier]
  14.  
  15.     # Attacker and target pronouns. Possessive (its, his, her), Singular Subject (it, he, she), Singular Object (it, him, her)
  16.     a_poss, a_sin_sub, a_sin_obj = pronoun(attacker)
  17.     t_poss, t_sin_sub, t_sin_obj = pronoun(target)
  18.  
  19.     a_name = prop_name(attacker)
  20.     t_name = prop_name(target)
  21.     c_a_name = cap(attacker.key)
  22.     c_t_name = cap(target.key)
  23.  
  24.     # Weapon's article. 'a' or 'an'
  25.     art_weap = article(weapon.name)
  26.     if hit:
  27.         a_outcome = f"{cap(t_sin_sub)} suffers {article(attack_wound)} {attack_wound} to {t_poss} {body_part}."
  28.         t_outcome = f"You suffer {article(attack_wound)} {attack_wound} to your {body_part}."
  29.         o_outcome = f"{c_t_name} suffers {article(attack_wound)} {attack_wound} to {t_poss} {body_part}."
  30.     else:
  31.         a_outcome = "You miss!"
  32.         t_outcome = f"{c_a_name} misses!"
  33.         o_outcome = f"{c_a_name} misses!"
  34.  
  35.     skillsets = {'staves':
  36.                     {'leg sweep':
  37.                         {'attack_desc':
  38.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  39.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  40.                         },
  41.                     'feint':
  42.                         {'attack_desc':
  43.                             {'attacker': f"You sweep your {weapon} at {target}\'s legs, {a_outcome}",
  44.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  45.                         },
  46.                     'end jab':
  47.                         {'attack_desc':
  48.                             {'attacker': f"You sweep your {weapon} at {target}\'s legs, {a_outcome}",
  49.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  50.                         },
  51.                     'swat':
  52.                         {'attack_desc':
  53.                             {'attacker': f"Using the center of {art_weap} {weapon} as a fulcrum, you swat at {t_name} with one end of the weapon! {a_outcome}",
  54.                             'target': f"Using the center of {art_weap} {weapon} as a fulcrum, {attacker} swats at you with one end of the weapon! {t_outcome}",
  55.                             'others': f"Using the center of {art_weap} {weapon} as a fulcrum, {attacker} swats at {t_name} with one end of the weapon! {o_outcome}"}
  56.                         },
  57.                     'simple strike':
  58.                         {'attack_desc':
  59.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  60.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  61.                         },
  62.                     'side strike':
  63.                         {'attack_desc':
  64.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  65.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  66.                         },
  67.                     'pivot smash':
  68.                         {'attack_desc':
  69.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  70.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  71.                         },
  72.                     'longarm strike':
  73.                         {'attack_desc':
  74.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  75.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  76.                         },
  77.                     'simple block':
  78.                         {'attack_desc':
  79.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  80.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  81.                         },
  82.                     'cross block':
  83.                         {'attack_desc':
  84.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  85.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  86.                         },
  87.                     'overhead block':
  88.                         {'attack_desc':
  89.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  90.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  91.                         },
  92.                     'parting jab':
  93.                         {'attack_desc':
  94.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  95.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  96.                         },
  97.                     'parting swat':
  98.                         {'attack_desc':
  99.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  100.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  101.                         },
  102.                     'parting smash':
  103.                         {'attack_desc':
  104.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  105.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  106.                         },
  107.                     'defensive sweep':
  108.                         {'attack_desc':
  109.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  110.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  111.                         },
  112.                     'stepping spin':
  113.                         {'attack_desc':
  114.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  115.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  116.                         },
  117.                     'snapstrike':
  118.                         {'attack_desc':
  119.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  120.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  121.                         },
  122.                     'sweep strike':
  123.                         {'attack_desc':
  124.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  125.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  126.                         },
  127.                     'spinstrike':
  128.                         {'attack_desc':
  129.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  130.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  131.                         },        
  132.                     'tbash':
  133.                         {'attack_desc':
  134.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  135.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  136.                         },
  137.                     'whirling block':
  138.                         {'attack_desc':
  139.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  140.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  141.                         },
  142.                     'pivoting longarm':
  143.                         {'attack_desc':
  144.                             {'attacker': f"You sweep your {weapon} at {t_name}\'s legs, {a_outcome}",
  145.                             'others': f"{c_a_name} sweeps {art_weap} {weapon} at {t_name}\'s legs, {o_outcome}"}
  146.                         }
  147.                     },
  148.                                            
  149.                 'rat':
  150.                     {'claw':
  151.                         {'attack_desc':
  152.                             {'attacker': f"You claw at {t_name} with your front paws! {a_outcome}",
  153.                             'target': f"{c_a_name} claws at you with {a_poss} front paws! {t_outcome}",
  154.                             'others': f"{c_a_name} claws at {t_name} with {a_poss} front paws! {o_outcome}"}
  155.                         }
  156.                     }
  157.                 }
  158.  
  159.     attacker_desc = skillsets[skillset][skill]['attack_desc']['attacker']
  160.     target_desc = skillsets[skillset][skill]['attack_desc']['target']
  161.     others_desc = skillsets[skillset][skill]['attack_desc']['others']
  162.  
  163.     return attacker_desc, target_desc, others_desc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top