Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Fixes for typeless damage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rughalt committed Oct 8, 2020
1 parent 55e1f54 commit 5a4112b
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 14 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog
## 0.85.2
## 0.85.4
### Features
- [#55](https://github.com/Rughalt/D35E/issues/55) - Updated French translation by @red5h4d0w
- Updated Class Abilities/Features rendering style
### Bug Fixes
- Fixed regression caused by displaying damage type for typeless damage

## 0.85.3
### SRD
- Finished Base classes implementation
- Added Base classes descriptions and art
Expand Down
25 changes: 23 additions & 2 deletions D35E.css
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@
border-left: 1px solid #c9c7b8;
padding: 0 2px 0 2px;
}
.D35E.sheet.item .inventory-list progression-pp {
.D35E.sheet.item .inventory-list .progression-pp {
flex: 0 60px;
border-left: 1px solid #c9c7b8;
padding: 0 2px 0 2px;
Expand Down Expand Up @@ -2528,12 +2528,33 @@
border-top: 1px solid #c9c7b8;
}
.D35E.sheet.item .progression-ability-description {
font-size: 13px;
margin-bottom: 0.5rem;
}
.D35E.sheet.item .progression-ability-description div,
.D35E.sheet.item .progression-ability-description div {
display: inline;
}
.D35E.sheet.item .progression-ability-description p {
display: inline;
}
.D35E.sheet.item .progression-ability-description p:first-of-type::after {
content: "\a";
white-space: pre;
}
.D35E.sheet.item .progression-ability-description p:not(:first-of-type) {
display: block;
}
.D35E.sheet.item .progression-ability-description h1,
.D35E.sheet.item .progression-ability-description h2,
.D35E.sheet.item .progression-ability-description h3 {
font-size: 13px;
text-decoration: underline;
}
.D35E.sheet.item .progression-ability-description h1:first-child,
.D35E.sheet.item .progression-ability-description h2:first-child,
.D35E.sheet.item .progression-ability-description h3:first-child {
display: inline;
}
.D35E.sheet.item .progression-ability-description br {
margin: 1rem;
}
Expand Down
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,8 @@
"D35E.PointBuyCalculatorEpicFantasy": "Epic Fantasy",
"D35E.AutomaticFeatures": "Automate Class Features addition/deletion",
"D35E.MaxLevelAutomationInfo": "If you enter a value in Max Level field, class description will automatically generate progression tables based on BAB and Throws. Enabling Automate Class Features will cause clas to automatically add Class features to Charactes on level up and remove them when lowering level.",

"D35E.NonActiveClassAbilities": "Non-Active Class Abilities",
"D35E.MaxLevel": "Max Level",

"SETTINGS.D35EShowPartyHudN": "Party HUD type",
"SETTINGS.D35EShowPartyHudL": "How to display party HUD",
Expand Down
2 changes: 1 addition & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@
"D35E.PointBuyCalculatorEpicFantasy": "Fantaisie épique",
"D35E.AutomaticFeatures": "Rendre automatique l'ajout et le retrait d'aptitudes de classe",
"D35E.MaxLevelAutomationInfo": "Si vous entrez une valeur dans Niveau max, des tables seront automatiquement générées pour les bonus de sauvegarde et de base à l'attaque. Activer l'option automatique fera que les aptitudes de classe seront automatiquement assignées lorsqu'un personnage atteindra le niveau de l'aptitude.",

"D35E.MaxLevel": "Niveau max",

"SETTINGS.D35EShowPartyHudN": "Type d'affichage tête haute de l'équipe ",
"SETTINGS.D35EShowPartyHudL": "Active l'affichage tête haute de l'équipe",
Expand Down
22 changes: 20 additions & 2 deletions less/items.less
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@
padding: 0 2px 0 2px;
}

progression-pp {
.progression-pp {
flex: 0 60px;
border-left: 1px solid #c9c7b8;
padding: 0 2px 0 2px;
Expand Down Expand Up @@ -745,10 +745,28 @@


.progression-ability-description {
font-size: 13px;
margin-bottom: 0.5rem;
div, p {
div {
display: inline;
}
p {
display: inline;
&:first-of-type::after{
content: "\a";
white-space: pre;
}
&:not(:first-of-type) {
display: block;
}
}
h1, h2, h3 {
font-size: 13px;
text-decoration: underline;
&:first-child {
display: inline;
}
}
br {
margin: 1rem;
}
Expand Down
4 changes: 2 additions & 2 deletions module/item/sheets/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export class ItemSheetPF extends ItemSheet {
let alreadyAddedDescriptions = new Set()
data.abilitiesDescription = []
{
for (let e of CACHE.ClassFeatures.get(this.item.data.name) || []) {
for (let e of new Set(CACHE.ClassFeatures.get(this.item.data.name) || [])) {
if (e.data.type === "feat")
data.children.traits.push(e);
else
Expand Down Expand Up @@ -436,7 +436,7 @@ export class ItemSheetPF extends ItemSheet {
data.progression[a[0] - 1]['nonActive'].push({'name': a[1], 'desc': a[2]});
}
if (a[2] !== '') {
data.abilitiesDescription.push({level: a[0], name: a[1], description: a[2]})
data.abilitiesDescription.push({level: a[0], name: a[1], description: TextEditor.enrichHTML(a[2])})
}
})
}
Expand Down
1 change: 1 addition & 0 deletions module/misc/chat-attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class ChatAttack {

getShortToolTip(damageText) {
var match = damageText.match(/([0-9]+) \((.*?)\)/)
if (match === null) return `<img src="/systems/D35E/icons/damage-type/unknown.svg" title="Part" class="dmg-type-icon" />${damageText}`
let dmgVal = match[1];
let dmgName = match[2];
let dmgIconBase = match[2].toLowerCase();
Expand Down
6 changes: 3 additions & 3 deletions packs/class-abilities.db

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "D35E",
"title": "DND 3.5e",
"description": "DND 3.5E implementation for Foundry VTT. Aiming to provide 100% SRD coverage.<br><br>Originaly based LoopeeDK conversion of Furyspark's Pathfinder1 system.",
"version": "0.85.3",
"version": "0.85.4",
"author": "Rughalt",
"templateVersion": 2,
"scripts": [],
Expand Down
2 changes: 1 addition & 1 deletion templates/items/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h4 class="form-header">{{localize "D35E.AdditionalClassFeatures"}}</h4>
data-dtype="String"/>
</div>

{{#if isBaseClass}}
{{#if false}}
<h4 class="form-header">{{localize "D35E.FavouredClassBonuses"}}</h4>

{{!-- Favoured Class Bonuses --}}
Expand Down
12 changes: 12 additions & 0 deletions templates/welcome-screen.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ <h2></h2>
</div>
<div class="tab" data-tab="changelog">
<h1>Changelog</h1>

<h2>v0.85.4</h2>
<h3>Features</h3>
<ul>
<li> <a href="https://github.com/Rughalt/D35E/issues/55">#55</a> - Updated French translation by @red5h4d0w
<li> Updated Class Abilities/Features rendering style
</ul>

<h3>Bug Fixes</h3>
<ul>
<li> Fixed regression caused by displaying damage type for typeless damage
</ul>
<h2>v0.85.2</h2>
<h3>SRD</h3>
<ul>
Expand Down

0 comments on commit 5a4112b

Please sign in to comment.