forked from HeyOmae/Omae
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
101 lines (70 loc) · 3.81 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
inventory = {};
var invNum = 1; //inventory number for naming two items of the same kind
var clothingcost = 20; //this is the cost of clothing
var electrochromiccost = 0; //this is the cost of clothing with electro chromatic
var feedbackcost = 0; //this is the cost of clothing with feedback
var synthleathercost = 0; //this is the cost of leather clothing
var clothingavail = 0; //the avail of the clothing
var clothingarmor = 0; //the armor value of the clothing, only effected by leather
$(function() {
setupQualities();
setupSkills();
setupGear();
setupAugmentations();
setupAmmo();
setupElectronics();
setupArmor();
setupVehicles();
setupLifestyles();
setupComplexForms();
//runs the attribute display function on start up
displayUpdater();
$(".a, .b, .c, .d, .e").click(selectPriority);
//this part will call the metatype select function when a metatype button is clicked
$(".human, .elf, .dwarf, .ork, .troll").click(selectMetatype);
$("#container").on("click", ".incAtt, .decAtt", changeAttribute);
$(".mage, .techno, .mystic, .adept, .aspect").click(selectMagRes);
$(".knowButton").click(knowledgeTypeSelect);
$("#addSkill").click(addKnowing);
$(".add").click(addPowerPoint);
//@TODO - this probably should be more specific and not on EVERY click
$().click(spellActivate);
$("#spelllist").on("click", ".spellact, .prepact", spellActivate);
$(".formact").click(complexFormActivate);
$(".weapact").click(buyWeapon);
$("#gearResource").on("click", ".sell", sellWeapon);
$("#firearms").on("change", "select", settingWeapon);
$("#firearms").on("click", ".smartgun.button", smartlink);
$("#firearms").on("click", ".shockpad.button", shockPadding);
$("#firearms").on("click", ".airburstlink.button", airBurstLink);
$("#firearms").on("click", ".concealableholster.button, .hiddenarmslide.button, .quickdrawholster.button", holsters);
$("#ammunition").on("click", ".buyammo,.sellammo,.buygrenades,.sellgrenades", buyingAmmo);
//explosive ammo after this
$("#grenadeammo .blastafter, #rocketammo .blastafter").after("<td>Blast</td>");
$(".grenadesname").on("change", "select.toxicgas", toxicgas);
gasGrenade("teargas"); //sets grenade at start
$(".gas .sellgrenades").addClass("deact");
$("#explosive").on("click", ".bombup, .bombdown", kaboom); //increases an explosive's rating
$("#explosive").on("click", ".buybomb,.sellbomb", bombsaway); //buy and sell explosives
$("#explosive").on("click", ".kgup, .kgdown", fatboy);
$("#explosive").on("click", ".buyDet, .sellDet", buyDetonator);
$("#clotharmor").on("click", ".buyarmor", sponge);
$("#clotharmor").on("click", ".sellarmor", clearArmor);
$("#clotharmor").on("click", ".armmodup, .armmoddown, .buyarmmod", armorModding);
$("#clotharmor").on("click", ".buyhelmmod", helmup);
$("#clothing").on("change", "input", fashioncost);
$("#clothing").on("click", ".button", fashionbutton);
$("#gearResource").on("click", ".buyUp, .sellDown", buyinbulk);
$("#gearResource").on("click", ".buydevice", appleStore);
$("#gearResource").on("click", ".selldevice", sellDevice);
$("#gearResource").on("click", ".ratingUp, .ratingDown", commRating);
$("#securitydevice").on('click', ".addmod", addingMagMod);
$("#devices").on("click", ".programs .button", buyProgram); //this is for buying cyber programs for decks and RCCs
$("#devices").on("click", ".linkmods .button", buylinkmod); //commlink mods
$("#e-accessories").on("change", ".modslot select", modChange);
$("#magicequipment").on("change", ".magicType select", spellChange);
$("#qifoci").on("change", ".adeptPowers select", adeptPowerChange);
$("#cyberlimbs").on("change", "select", typeOfLimb);
//this allows for a limb to have custom str or agi. It also allows people to buy limbs, since that's also a button
$("#cyberlimbs").on("click", ".button", customLimb);
});