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.5KB

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