parent
9905206487
commit
65f01194fa
34
crit.js
34
crit.js
|
|
@ -166,11 +166,11 @@ on("chat:message", function(msg) {
|
|||
function show_rolls(who,d_vars){
|
||||
//Return a beautiful table showing the results and some information depending on the type of action "e":Dodge "a":Attack "d":Defense
|
||||
|
||||
var msg_head="<div style='border-radius: 6px; border: 2px solid #898989;'> <table style='text-align: left;' width=100% border='0' cellpadding='3' cellspacing='0'> <tbody>"
|
||||
var msg="<tr><td style='border-radius: 6px; border: 2px solid #898989; background-color: #999999;'>";
|
||||
var msg_head="<div id='sheet-rolltemplate-d10fight-all' class='sheet-rolltemplate-d10fight'> <div id='sheet-rolltemplate-d10fight-blob' class='sheet-rolltemplate-d10fight-blob'> <table class='sheet-rolltemplate-d10fight'> <tbody>"
|
||||
var msg="<tr><td class='sheet-name'>";
|
||||
var msg_foot="</tr></td></table></div>";
|
||||
var msg_adds="";
|
||||
var msg_relance="<a style='text-align:right; background-color: #999999;' href='!crit 0 P "+d_vars.perfection+" I 0 "+d_vars.defense_i_0+" I 1 "+d_vars.defense_i_1+
|
||||
var msg_relance="<a class='sheet-rolltemplate-d10fight' href='!crit 0 P "+d_vars.perfection+" I 0 "+d_vars.defense_i_0+" I 1 "+d_vars.defense_i_1+
|
||||
" I 4 "+d_vars.defense_i_2+" R "+d_vars.rempart_p+" F "+d_vars.fauchage+
|
||||
" E 0 "+d_vars.exploiter_p_0+" E 1 "+d_vars.exploiter_p_1+" E 4 "+d_vars.exploiter_p_2+" T 0 "+d_vars.tir_p_0+" T 2 "+d_vars.tir_p_1+
|
||||
" i "+d_vars.tir_i+" C "+d_vars.charge+" N "+d_vars.charge_i+" + "+(d_vars.nb_2add+d_vars.technique_result+d_vars.encaissement_result)+" - "+d_vars.nb_2sub+
|
||||
|
|
@ -214,39 +214,39 @@ function show_rolls(who,d_vars){
|
|||
|
||||
msg+=add_thoose_dices(d_vars,d_vars.results,"",m_esq,m_crit);
|
||||
if (d_vars.fauchage!=0) msg+=add_thoose_dices(d_vars,d_vars.cleave,"Fauchage: ",m_esq,m_crit);
|
||||
if (d_vars.coup_d!=0) msg_adds+="<tr><td style='padding-left:10px'>Coup déchirant: "+d_vars.coup_d_results.join(" ")+"</tr></td>"; // Coup déchirant
|
||||
if (d_vars.technique_m!=0) msg_adds+="<tr><td style='padding-left:10px'>Technique martiale: "+d_vars.technique_result+"</tr></td>"; // Technique martiale
|
||||
if (d_vars.relances!=0) msg_adds+="<tr><td style='padding-left:10px'>Relances: "+d_vars.relances+"</tr></td>"; // Technique martiale
|
||||
if (d_vars.encaissement!=0) msg_adds+="<tr><td style='padding-left:10px'>Encaissement: "+d_vars.encaissement_result+"</tr></td>"; // Technique martiale
|
||||
if (d_vars.coup_d!=0) msg_adds+="<tr><td class='sheet-additional'>Coup déchirant: "+d_vars.coup_d_results.join(" ")+"</tr></td>"; // Coup déchirant
|
||||
if (d_vars.technique_m!=0) msg_adds+="<tr><td class='sheet-additional'>Technique martiale: "+d_vars.technique_result+"</tr></td>"; // Technique martiale
|
||||
if (d_vars.relances!=0) msg_adds+="<tr><td class='sheet-additional'>Relances: "+d_vars.relances+"</tr></td>"; // Technique martiale
|
||||
if (d_vars.encaissement!=0) msg_adds+="<tr><td class='sheet-additional'>Encaissement: "+d_vars.encaissement_result+"</tr></td>"; // Technique martiale
|
||||
|
||||
if (dice_stats.is_crit==1) msg+="<tr><td style='background-color:#b0d6ad;'>L'action est une réussite critique</tr></td>";
|
||||
if (dice_stats.is_crit==1) msg+="<tr><td class='sheet-critical'>L'action est une réussite critique</tr></td>";
|
||||
if (dice_stats.is_hit==1){
|
||||
if (d_vars.seuil!=0){
|
||||
if (d_vars.action=="a"){
|
||||
msg+="<tr><td style='background-color:#b0d6ad;'>L'attaque parvient à toucher sa cible</tr></td>";
|
||||
msg+="<tr><td class='sheet-hit'>L'attaque parvient à toucher sa cible</tr></td>";
|
||||
} else if (d_vars.action=="d"||d_vars.action=="e"){
|
||||
// Can't miss a block or a dodge, can be a shitty roll tho
|
||||
} else {
|
||||
msg+="<tr><td style='background-color:#b0d6ad;'>L'action est un succes</tr></td>";
|
||||
msg+="<tr><td class='sheet-sucess'>L'action est un succes</tr></td>";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (d_vars.action=="a"){
|
||||
msg+="<tr><td style='background-color:#d6adad;'>L'attaque ne touche pas sa cible</tr></td>";
|
||||
msg+="<tr><td class='sheet-miss'>L'attaque ne touche pas sa cible</tr></td>";
|
||||
} else if (d_vars.action=="d"||d_vars.action=="e"){
|
||||
// Can't miss a block or a dodge
|
||||
} else {
|
||||
msg+="<tr><td style='background-color:#d6adad;'>L'action est un echec</tr></td>";
|
||||
msg+="<tr><td class='sheet-fail'>L'action est un echec</tr></td>";
|
||||
}
|
||||
}
|
||||
msg+=msg_adds;
|
||||
sendChat(who,msg_head+msg+msg_foot+msg_relance);
|
||||
sendChat(who,msg_head+msg+msg_foot+msg_relance+"</div>");
|
||||
//logit(msg_head+msg+msg_foot);
|
||||
}
|
||||
|
||||
function add_thoose_dices(d_vars,results,name,m_esq,m_crit){
|
||||
logit(results);
|
||||
var dices="<tr><td> "+name;
|
||||
var dices="<tr><td class='sheet-line'> "+name;
|
||||
var is_below=0,is_acrit=0;
|
||||
var sum=0;
|
||||
var t_hit=d_vars.seuil,t_crit=Math.max(7,d_vars.seuil); //The crit threshold can change if the hit threshold is higher
|
||||
|
|
@ -254,7 +254,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){
|
|||
for (var i=0,len=results.length;i<len;i++){
|
||||
//Is it under the threshold?
|
||||
if (results[i]<t_hit && is_below==0){
|
||||
dices+="<span style='color: #999999;'>"; //Start greying everithing
|
||||
dices+="<span class='sheet-rolltemplate-d10fight-grey'>"; //Start greying everything
|
||||
is_below=1;
|
||||
}
|
||||
if (results[i]>t_hit && is_below==1){
|
||||
|
|
@ -262,7 +262,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){
|
|||
is_below=2;
|
||||
}
|
||||
if (results[i]>t_crit&&is_acrit==0){
|
||||
dices+="<span style='color: #009900;'>"; //Start greening everithing
|
||||
dices+="<span class='sheet-rolltemplate-d10fight-green'>"; //Start greening everything
|
||||
is_acrit=1;
|
||||
}
|
||||
// Only add to the sum if you pass the threshold
|
||||
|
|
@ -292,7 +292,7 @@ function add_thoose_dices(d_vars,results,name,m_esq,m_crit){
|
|||
sum=Math.floor(((sum*m_esq+d_vars.on_hit_c+d_vars.attribute))*m_crit)+d_vars.nb_2add-d_vars.nb_2sub;
|
||||
sum+=d_vars.defense_i_0+d_vars.exploiter_p_0+d_vars.charge+d_vars.technique_result+d_vars.encaissement_result;
|
||||
|
||||
dices+="<tr><td style='text-align: right; padding-right:10px;' > Total: "+sum+"</tr></td>";
|
||||
dices+="<tr><td class='sheet-sum'> Total: "+sum+"</tr></td>";
|
||||
|
||||
//logit(dices);
|
||||
return dices;
|
||||
|
|
|
|||
|
|
@ -850,7 +850,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<rolltemplate class="sheet-rolltemplate-d10skillcheck">
|
||||
<table>
|
||||
<table class="">
|
||||
<tr><th class="roll-title">{{name}} — {{roll_name}}</th></tr>
|
||||
<tr><td class="roll-attr"> Test au d{{dice_name}} seuil {{threshold}} </td></tr>
|
||||
<tr>
|
||||
|
|
|
|||
121
style.css
121
style.css
|
|
@ -27,7 +27,6 @@ input.sheet-secondary_skills_tab3:checked ~ div.sheet-secondary_skills_tab3
|
|||
display:block;
|
||||
}
|
||||
|
||||
|
||||
input.sheet-tab{
|
||||
-moz-appearance: none;
|
||||
width:150px;
|
||||
|
|
@ -42,12 +41,10 @@ input.sheet-tab{
|
|||
input.sheet-tab::before{
|
||||
-moz-appearance: none;
|
||||
content: attr(title);
|
||||
|
||||
border-radius:.5em;
|
||||
border:2px solid black;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
|
||||
background: black;
|
||||
color:white;
|
||||
width: 150px;
|
||||
|
|
@ -73,7 +70,6 @@ input.sheet-small_tab{
|
|||
input.sheet-small_tab::before{
|
||||
-moz-appearance: none;
|
||||
content: attr(title);
|
||||
|
||||
border-radius:.5em;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
|
|
@ -83,7 +79,6 @@ input.sheet-small_tab::before{
|
|||
width: 120px;
|
||||
height:20px;
|
||||
font-size: 14px;
|
||||
|
||||
}
|
||||
input.sheet-small_tab:checked::before{
|
||||
-moz-appearance: none;
|
||||
|
|
@ -104,7 +99,6 @@ div.sheet-tab-content{
|
|||
border-top-color: #000;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
|
||||
select.sheet-skill_select{
|
||||
width:55px;
|
||||
margin-bottom:-1px;
|
||||
|
|
@ -113,7 +107,6 @@ select.sheet-dice_select{
|
|||
width:85px;
|
||||
margin-bottom:-1px;
|
||||
}
|
||||
|
||||
.sheet-trait{
|
||||
width: 30px;
|
||||
}
|
||||
|
|
@ -121,39 +114,50 @@ select.sheet-dice_select{
|
|||
width: 50px;
|
||||
}
|
||||
|
||||
|
||||
.sheet-rolltemplate-d10skillcheck table {
|
||||
border-radius: 6px;
|
||||
width:100%;
|
||||
border: 2px solid #898989;
|
||||
background-color: #999999;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
padding: 2px;
|
||||
border: 1px solid;
|
||||
background-color: #ffffff;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #000;
|
||||
border-image-source: none;
|
||||
}
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-roll-title,
|
||||
.sheet-rolltemplate-d10skillcheck th {
|
||||
color: rgb(42, 42, 42);
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
padding-left: 5px;
|
||||
font-size: 1.2em;
|
||||
text-align: left;
|
||||
font-family: "Times New Roman", Times, serif;
|
||||
font-variant: small-caps;
|
||||
text-transform: capitalize;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess ,
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-roll-fail {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
border-width: 0px;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-roll-crit {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
border-width: 0px;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 5px;
|
||||
background-color:#b0d6ad;
|
||||
}
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-roll-fumble {
|
||||
padding-left: 5px;
|
||||
margin-bottom: 8px;
|
||||
border-width: 0px;
|
||||
background-color:#d6adad;
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +167,10 @@ select.sheet-dice_select{
|
|||
font-style: italic;
|
||||
padding-left: 9px;
|
||||
padding-top: 0px;
|
||||
border-width: 0px;
|
||||
margin-top: -10px;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-inline,
|
||||
|
|
@ -179,13 +186,95 @@ select.sheet-dice_select{
|
|||
color: #3FB315;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail,
|
||||
.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail {
|
||||
color: #B31515;
|
||||
border: none;
|
||||
border: none;
|
||||
}
|
||||
.sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll {
|
||||
color: #4A57ED;
|
||||
border: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sheet-rolltemplate-d10fight-blob{
|
||||
border-radius: 6px;
|
||||
border: 1px solid #898989;
|
||||
z-index: 1;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight table{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
text-align: left;
|
||||
width:100%;
|
||||
border:none;
|
||||
cellpadding:3px;
|
||||
cellspacing:0px;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-sum{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
border:none;
|
||||
text-align: right;
|
||||
padding-right:10px;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-sucess,
|
||||
.sheet-rolltemplate-d10fight .sheet-line{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
padding-left: 3px;
|
||||
border:none;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-critical{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
border:none;
|
||||
padding-left: 3px;
|
||||
border-radius: 4px;
|
||||
background-color:#b0d6ad;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-hit{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
padding-left: 3px;
|
||||
border-radius: 4px;
|
||||
background-color:#b0d6ad;
|
||||
border:none;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-miss{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
padding-left: 3px;
|
||||
border:none;
|
||||
border-radius: 4px;
|
||||
background-color:#d6adad;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-name{
|
||||
padding:0px;
|
||||
padding-left: 3px;
|
||||
margin:0px;
|
||||
border:none;
|
||||
border-radius: 4px;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
background-color: #999999;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight .sheet-additional{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
border:none;
|
||||
padding-left:10px;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight-grey{
|
||||
color: #999999;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight-green{
|
||||
color: #009900;
|
||||
}
|
||||
.sheet-rolltemplate-d10fight a,
|
||||
.sheet-rolltemplate-d10fight a[href^="!"],
|
||||
.sheet-rolltemplate-d10fight a[href^="~"]{
|
||||
text-align:right;
|
||||
background-color: #999999; !important
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue