Simplified Bonus-Output
This commit is contained in:
parent
d315d38c39
commit
8c7a8f9777
1 changed files with 18 additions and 32 deletions
46
src/jsds.js
46
src/jsds.js
|
@ -298,40 +298,26 @@
|
|||
sel_bon: function() {
|
||||
var outstr="<p>";
|
||||
outstr += "Boni?<br>";
|
||||
outstr += "Waffenbonus Nahkampf: <input id='wbn' type=numer step=1 min=0></input><br />";
|
||||
outstr += "Waffenbonus Fernkampf: <input id='wbf' type=numer step=1 min=0></input><br>";
|
||||
outstr += "Panzerungsbonus: <input id='pb' type=numer step=1 min=0></input><br>";
|
||||
outstr += "Zauberbonus: <input id='zb' type=numer step=1 min=0></input><br>";
|
||||
outstr += "Waffenbonus Nahkampf: <input id='wbn' class='bon' type=numer step=1 min=0></input><br />";
|
||||
outstr += "Waffenbonus Fernkampf: <input id='wbf' class='bon' type=numer step=1 min=0></input><br>";
|
||||
outstr += "Panzerungsbonus: <input id='pb' class='bon' type=numer step=1 min=0></input><br>";
|
||||
outstr += "Zauberbonus: <input id='zb' class='bon' type=numer step=1 min=0></input><br>";
|
||||
|
||||
$('#uibon').html(outstr);
|
||||
$('#wbn').attr("value", cur_sel.extern.weapon_near+"")
|
||||
.bind("change",
|
||||
function() {cur_sel.extern.weapon_near = this.value*1;
|
||||
$('.bon').bind("change", function() {
|
||||
cur_sel.extern.weapon_near = $('#wbn').val()*1;
|
||||
cur_sel.extern.weapon_far = $('#wbf').val()*1;
|
||||
cur_sel.extern.armor = $('#pb').val()*1;
|
||||
cur_sel.extern.chant = $('#zb').val()*1;
|
||||
cur_sel.recalc_battle();
|
||||
cur_sel.sel_att();
|
||||
cur_sel.printoutput();
|
||||
}
|
||||
);
|
||||
$('#wbf').attr("value", cur_sel.extern.weapon_far)
|
||||
.bind("change",
|
||||
function() {cur_sel.extern.weapon_far = this.value*1;
|
||||
cur_sel.recalc_battle();
|
||||
cur_sel.printoutput();
|
||||
}
|
||||
);
|
||||
$('#pb').attr("value",cur_sel.extern.armor)
|
||||
.bind("change",
|
||||
function() {cur_sel.extern.armor = this.value*1;
|
||||
cur_sel.recalc_battle();
|
||||
cur_sel.printoutput();
|
||||
}
|
||||
);
|
||||
$('#zb').attr("value",cur_sel.extern.chant)
|
||||
.bind("change",
|
||||
function() {cur_sel.extern.chant = this.value*1;
|
||||
cur_sel.recalc_battle();
|
||||
cur_sel.printoutput();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('#wbn').attr("value", cur_sel.extern.weapon_near+"");
|
||||
$('#wbf').attr("value", cur_sel.extern.weapon_far);
|
||||
$('#pb').attr("value",cur_sel.extern.armor);
|
||||
$('#zb').attr("value",cur_sel.extern.chant);
|
||||
},
|
||||
printoutput: function() {
|
||||
outstr = "<p>";
|
||||
|
|
Loading…
Reference in a new issue