Gestion de personnage et de pool de personnage en javascript vanilla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

players.js 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. var characters = new Characters();
  2. characters.createSamourai( "courtier", "m", "takahashi", "kitsuki", "kitsuki", 0, 0,
  3. { "investigation" : 2, "courtier" : 1, "etiquette" : 1 });
  4. characters.createSamourai( "bushi", "m", "kaji", "mirumoto", "mirumoto bushi", 0, 0,
  5. { "defense" : 1, "kenjutsu" : 1, "meditation" : 1, "athletics" : 1 });
  6. characters.createSamourai( "monk", "m", "kiyoshi", "asako", "asako henshin", 0, 0,
  7. { "calligraphy" : 1, "jiujutsu" : 1, "lore: theology": 1, "sincerity" : 1, "meditation" : 1, "medecine" : 1});
  8. characters.createSamourai( "shugenja", "f", "", "tamori", "void mystic", 0, 0,
  9. { "calligraphy" : 1, "defense" : 1, "medecine" : 1, "spellcraft" : 1 });
  10. characters.createSamourai( "shugenja", "f", "honami", "utaku", "meishodo shugenja", 0, 0,
  11. { "calligraphy" : 1, "craft: meishodo" : 1, "spellcast (research)" : 1, "kenjutsu" : 1 }) ;
  12. for(let j = 0 ; j < characters.size() ; j++){
  13. characters.at(j).experience = 39;
  14. switch( characters.at(j).name.familly ){
  15. case "utaku":
  16. characters.at(j).increaseTrait("willpower");
  17. characters.at(j).increaseTrait("willpower");
  18. break;
  19. case "tamori" :
  20. characters.at(j).increaseTrait("void");
  21. characters.at(j).increaseTrait("void");
  22. characters.at(j).increaseSkill("calligraphy");
  23. characters.at(j).increaseSkill("defense");
  24. characters.at(j).increaseSkill("medecine");
  25. characters.at(j).increaseSkill("spellcraft");
  26. break;
  27. case "asako" :
  28. characters.at(j).increaseSkill("willpower");
  29. characters.at(j).increaseSkill("agility");
  30. characters.at(j).increaseSkill("intelligence");
  31. characters.at(j).increaseSkill("jiujutsu");
  32. characters.at(j).increaseSkill("lore: theology");
  33. characters.at(j).increaseSkill("meditation");
  34. break;
  35. case "mirumoto":
  36. characters.at(j).increaseTrait("agility");
  37. characters.at(j).increaseTrait("agility");
  38. characters.at(j).increaseTrait("void");
  39. break;
  40. case "kitsuki":
  41. characters.at(j).increaseTrait("reflexe");
  42. characters.at(j).increaseTrait("intelligence");
  43. characters.at(j).increaseSkill("investigation");
  44. break;
  45. }
  46. }
  47. characters.createSamourai( "bushi", "f", "", "sons of the mountain tribe", "mirumoto bushi", 0, 0, { "knives" : 2 }) ;
  48. characters.createSamourai( "bushi", "f", "", "sons of the mountain tribe", "mirumoto bushi", 0, 0, { "swordwanship" : 2 }) ;
  49. characters.createSamourai( "bushi", "f", "", "sons of the mountain tribe", "mirumoto bushi", 0, 0, { "crossbow" : 2 }) ;
  50. characters.createSamourai( "bushi", "f", "", "daughters of the flame", "mirumoto bushi", 0, 0, { "crossbow" : 2 }) ;