Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- from character import *
- def dictMapping(inputData):
- charData = {
- "fName":inputData.get("fName","mapping"),
- "lName":inputData.get("lName","mapping"),
- "WS":inputData.get("WS",0),
- "BS":inputData.get("BS",0),
- "Strength":inputData.get("Stregnth",0),
- "Toughness":inputData.get("Toughness",0),
- "Agility":inputData.get("Agility",0),
- "Intelligence":inputData.get("Intelligence",0),
- "Perception":inputData.get("Perception",0),
- "Intelligence":inputData.get("Intelligence",0),
- "WP":inputData.get("WP",0),
- "Fell":inputData.get("Fell",0),
- "tWounds":inputData.get("tWounds",0),
- "cWounds":inputData.get("cWounds",0),
- }
- return character(fName=charData["fName"],lName=charData["lName"],WS=charData["WS"],\
- BS=charData["BS"],Strength=charData["Strength"],Toughness=charData["Toughness"],\
- Agility=charData["Agility"],Intelligence=charData["Intelligence"],\
- Perception=charData["Perception"],WP=charData["WP"],\
- Fell=charData["Fell"],tWounds=charData["tWounds"],\
- cWounds=charData["cWounds"])
- testCharData ={"race":'human',
- "fName": "Diaz",
- "lName":"Lan",
- "BS": 38,
- "WS": 52,
- "Strength": 35,
- "Toughness": 41,
- "Agility": 44,
- "Intelligence": 52,
- "Perception": 43,
- "WP": 39,
- "Fell": 47,
- "Home world": "Devo Sierra",
- "motivation": "profit",
- "Gender": "Male",
- "tWounds": 17,
- "cWounds":0,
- "skills": ["Awareness (perception)","Carouse (toughness)","Charm (fellowship)+20","Command (fellowship) +10","Common Lore (Imperium)","Common Lore (Jericho Reach)","Common Lore (Koronus Expanse)","Common Lore (Rogue Traders)","Deceive (fellowship)","Dodge (Agility)","Evaluate (Intelligence) +10","Forbidden Lore (Xenos)","Literacy (Intelligence) +10","Pilot (Space Craft) +20","Scholastic Lore (Astromancy)","Scrutiny (Perception)","SpeakLanguage(Low Gothic)","SpeakLanguage(High Gothic)","SpeakLanguage(Eldar)","Tactics (Intelligence)","Tech-Use (intelligence)"],
- "traits": ["Air of Authority","Ambidextrous","Deadeye Shot","Master Orator","Melee Weapon Training (Universal)","Mighty Shot","Peer (Imperial Navy)","Pistol Weapon Training (Universal)","Nerves of Steel","Quick Draw","Step Aside","Touched by the Fates (2)","Two-Weapon Wielder (Ballistic)"]
- }
- testingCharacter = dictMapping(testCharData)
- testingCharacter.setCharacteristicByName("Will Power",5)
- testingCharacter.setCharacteristicByName("SP",5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement