Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #279

Merged
merged 7 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"COMBAT.CHAT_SUCCESS": " trifft",
"COMBAT.CHAT_FAILURE": " verfehlt.",
"COMBAT.CHAT_BLEED": " blutet und verliert jede Runde zähigkeit: ",
"COMBAT.CHAT_CORRUPTED_ATTACK": "The attack inflict corruption: ",
"COMBAT.CHAT_POISON": " versucht zu vergiften ",
"COMBAT.CHAT_POISON_FAILURE": "Keine Vergiftung.",
"COMBAT.CHAT_POISON_EXTEND": "Das Ziel war bereits vergiftet, neue Dauer: Runden: ",
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
"COMBAT.CHAT_SUCCESS": " hits ",
"COMBAT.CHAT_FAILURE": " miss.",
"COMBAT.CHAT_BLEED": " bleeds and loses toughness each round: ",
"COMBAT.CHAT_CORRUPTED_ATTACK": "The attack inflict corruption: ",
"COMBAT.CHAT_POISON": " tries to poison ",
"COMBAT.CHAT_POISON_FAILURE": "No poisonning.",
"COMBAT.CHAT_POISON_EXTEND": "Target was already poisoned, new duration: rounds: ",
Expand Down
1 change: 1 addition & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
"COMBAT.CHAT_SUCCESS": " golpea a ",
"COMBAT.CHAT_FAILURE": " falla.",
"COMBAT.CHAT_BLEED": " sangra y pierde resistencia cada ronda: ",
"COMBAT.CHAT_CORRUPTED_ATTACK": "The attack inflict corruption: ",
"COMBAT.CHAT_POISON": " intenta envenenar ",
"COMBAT.CHAT_POISON_FAILURE": "No envenena.",
"COMBAT.CHAT_POISON_EXTEND": "El objetivo ya estaba envenenado, nueva duración: rondas: ",
Expand Down
1 change: 1 addition & 0 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
"COMBAT.CHAT_SUCCESS": " touche ",
"COMBAT.CHAT_FAILURE": " rate son coup.",
"COMBAT.CHAT_BLEED": " reçoit une blessure hémorragique et subit des dégâts chaque round : ",
"COMBAT.CHAT_CORRUPTED_ATTACK": "L'attaque inflige de la corruption: ",
"COMBAT.CHAT_POISON": " tente d'empoisonner ",
"COMBAT.CHAT_POISON_FAILURE": "Echec de l'empoisonnement.",
"COMBAT.CHAT_POISON_EXTEND": "La victime était déjà empoisonnée, nouvelle durée: rounds: ",
Expand Down
1 change: 1 addition & 0 deletions lang/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
"COMBAT.CHAT_SUCCESS": " träffar ",
"COMBAT.CHAT_FAILURE": " missar.",
"COMBAT.CHAT_BLEED": " blöder och förlorar tålighet varje runda: ",
"COMBAT.CHAT_CORRUPTED_ATTACK": "The attack inflict corruption: ",
"COMBAT.CHAT_POISON": " försöker förgifta ",
"COMBAT.CHAT_POISON_FAILURE": "Inte förgiftad.",
"COMBAT.CHAT_POISON_EXTEND": "Målet var redan förgiftat, ny varaktighet: rundor: ",
Expand Down
4 changes: 2 additions & 2 deletions msgdata/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"message":"<h1>Welcome to the Symbaroum system</h1><br />We are happy that you are using our system and wish you best of luck.<br/>If you want to give some feedback on the system, the developers are active on both the Foundry Discord (channel #free-league) and Davokar Explorers Discord."
},
{
"version":6,
"message":"<h1>Symbaroum 3.0.6</h1><br />We are happy to let you know that the unofficial Symbaroum for Foundry 0.8 is now up to version 3.0.6. This release is the first steps where we start phasing out the old Artifact template. Instead now you can turn any weapon, armor or equipment into an Artifact. There has also been some work to make the gear page behave more consistent when you have items with long names or use the PopOut! module.<br /> As always, if you have comments, please visit the #free-league channel on the Foundry Discord or join #symbaroum-vtt-foundry on Davokar Explorers League Discord. You can also see open features and bugs on our github page and are welcome to contribute. If you have comments, please visit the #free-league channel on the Foundry Discord. You can also see open features and bugs on our github page and are welcome to contribute."
"version":7,
"message":"<h1>Symbaroum 3.0.7</h1><br />We are happy to let you know that the unofficial Symbaroum for Foundry 0.8 is now up to version 3.0.7 (minor fix for those that host on Forge). <br />This release is the first steps where we start phasing out the old Artifact template. Instead now you can turn any weapon, armor or equipment into an Artifact.<br />There has also been some work to make the gear page behave more consistent when you have items with long names or use the PopOut! module.<br /><br /> As always, if you have comments, please visit the #free-league channel on the Foundry Discord or join #symbaroum-vtt-foundry on Davokar Explorers League Discord. You can also see open features and bugs on our github page and are welcome to contribute. If you have comments, positive or negative feedback, please visit the #free-league channel on the Foundry Discord. You can also see open features and bugs on our github page and are welcome to contribute."
}
]
}
27 changes: 22 additions & 5 deletions script/common/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export class SymbaroumActor extends Actor {
armor: activeArmor.name,
protectionPc: activeArmor.pc,
protectionNpc: activeArmor.npc,
unfavourPcProt: activeArmor.unfavourPcProt,
impeding: activeArmor.impeding,
tooltipProt: activeArmor.tooltip,
defense: totDefense,
Expand Down Expand Up @@ -257,7 +258,11 @@ export class SymbaroumActor extends Actor {
naturalwarriorLvl = getPowerLevel(naturalwarrior[0]).level;
}
let flagBerserk = this.getFlag(game.system.id, 'berserker');

let colossalLvl = 0;
let colossal = this.data.items.filter(element => element.data.data?.reference === "colossal");
if(colossal.length > 0){
colossalLvl = getPowerLevel(colossal[0]).level;
}
// check for abilities that changes attack attribute
let dominate = this.data.items.filter(element => element.data.data?.reference === "dominate");
let feint = this.data.items.filter(element => element.data.data?.reference === "feint");
Expand All @@ -280,6 +285,7 @@ export class SymbaroumActor extends Actor {
let sometimesOnBonusFromAbilitiesShort = "";
let bonusDamage = "";
let shortBonusDamage = "";
let damageFavour = 0;
if( item.data.data.bonusDamage !== undefined && item.data.data.bonusDamage != ""){
let plus = "+";
if(item.data.data.bonusDamage.charAt(0) === '+') {
Expand Down Expand Up @@ -373,7 +379,6 @@ export class SymbaroumActor extends Actor {
}
}


if(item.data.data?.isDistance){
if(sixthsense.length > 0){
if(this.data.data.attributes.vigilant.total > this.data.data.attributes[attribute].total){
Expand Down Expand Up @@ -428,11 +433,13 @@ export class SymbaroumActor extends Actor {
let baseDmgRoll = new Roll(baseDamage).evaluate({maximize: true});
let DmgRollExt= new Roll(pcDamageExt).evaluate({maximize: true});
let npcDamageExt = Math.ceil(DmgRollExt.total/2);
if(item.data.data.qualities?.massive) {
if(item.data.data.qualities?.massive || colossalLvl) {
pcDamage = "2d"+(baseDmgRoll.total)+"kh"+bonusDamage;
pcShort = "2d"+(baseDmgRoll.total)+"kh"+shortBonusDamage;
pcDamageExt = pcDamage + sometimesOnBonusFromAbilities;
pcExtShort = pcShort + sometimesOnBonusFromAbilitiesShort;
damageFavour = 1;
if(colossalLvl) tooltip += game.i18n.localize("TRAIT_LABEL.COLOSSAL") + ", ";
}
if(item.data.data.qualities?.deepImpact){
pcDamage += "+1d1["+game.i18n.localize("QUALITY.DEEPIMPACT")+"]";
Expand Down Expand Up @@ -468,7 +475,8 @@ export class SymbaroumActor extends Actor {
pcExtended: pcDamageExt,
pcExtShort: pcExtShort,
npcExtended: npcDamageExt,
npc: npcDamage
npc: npcDamage,
damageFavour: damageFavour
}
})
}
Expand Down Expand Up @@ -542,21 +550,25 @@ export class SymbaroumActor extends Actor {
}
let pcProt = "";
let armorRoll= null;
let unfavourPcProt = "0";
if( protection === "0" && bonusProtection === "") {
armorRoll = new Roll("0").evaluate({maximize: true});
} else if(protection === "0") {
pcProt = bonusProtection;
unfavourPcProt = bonusProtection;
armorRoll = new Roll(pcProt).evaluate({maximize: true});
} else {
pcProt = protection + bonusProtection;
armorRoll = new Roll(pcProt).evaluate({maximize: true});
let maxBaseArmor = new Roll(protection).evaluate({maximize: true});
unfavourPcProt = "2d"+(maxBaseArmor.total)+"kl"+bonusProtection;
}

let npcProt = Math.ceil(armorRoll.total/2);

if(item.data.data?.qualities?.reinforced){
pcProt += "+1";
npcProt+= 1;
unfavourPcProt += "+1";
}
return( {
_id: item.id,
Expand All @@ -566,6 +578,7 @@ export class SymbaroumActor extends Actor {
bonus: bonusProtection,
pc: pcProt,
npc: npcProt,
unfavourPcProt: unfavourPcProt,
tooltip: tooltip,
impeding: impeding,
isActive: item.data.isActive,
Expand Down Expand Up @@ -692,6 +705,10 @@ export class SymbaroumActor extends Actor {
damageProt.mysticalWeapon = 0.25
}
}
let colossal = this.data.items.filter(element => element.data.data?.reference === "colossal");
if(colossal.length > 0 && colossal[0].data.data.master.isActive){
damageProt.normal = 0;
}
return(damageProt)
}

Expand Down
Loading