Skip to content

Commit

Permalink
Merge pull request #1367 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
0.10.3
  • Loading branch information
snap01 authored Jun 25, 2023
2 parents 9c0a484 + c5272e5 commit e445f6c
Show file tree
Hide file tree
Showing 9 changed files with 331 additions and 206 deletions.
5 changes: 5 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Happy gaming !

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

- Fix compendium list view in v11 not showing base % or uncommon status on first load for skills
- Fix issues with half db if value is 0 or -1
- Update to Polish localization, thanks to @everyonecancode #1360.
- Update to Taiwanese localization, thanks to @zeteticl. #1361

## Version 0.10.2

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.
Expand Down
332 changes: 157 additions & 175 deletions .github/TRANSLATIONS.md

Large diffs are not rendered by default.

162 changes: 153 additions & 9 deletions lang/pl.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions lang/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"CoC7.InvestigatorManiaGained": "調查員患上躁狂症",
"CoC7.ManiaGained": "你患上躁狂症",
"CoC7.AlreadyUnderlyingInsanity": "調查員已經處於潛在的瘋狂狀態。",
"CoC7.IndefinitelyInsane": "你變成永久瘋狂",
"CoC7.IndefinitelyInsane": "你進入不定性瘋狂",
"CoC7.TemporaryInsane": "你進入臨時性瘋狂。",
"CoC7.GoodForAsylum": "你精神得要被送去精神療養院了",
"CoC7.BoutOfMadness": "臨時性瘋狂",
Expand Down Expand Up @@ -1212,5 +1212,9 @@
"CoC7.CoCIDFlag.error.document-not-found": "在世界或綜合手冊中找不到與 CoC ID「{cocid}」,語言「{lang}」和時代「{era}」匹配的文檔。請檢查您的世界設置的時代。",
"CoC7.CoCIDFlag.error.documents-not-found": "在世界或綜合手冊中找不到與 CoC ID({cocids})、語言「{lang}」和時代「{era}」匹配的文檔。請檢查您的世界設置的時代。",
"CoC7.CoCIDBatch.title": "批量設置系統 ID(CoC ID)",
"CoC7.CoCIDBatch.summary": "CoC7系統引入了系統 ID(CoC ID)。這允許系統識別FoundryVTT文檔,例如技能。此頁面將允許您為現有的{type}文檔設置ID。系統ID應使用名稱的英文翻譯來支持所有語言的本地化。"
}
"CoC7.CoCIDBatch.summary": "CoC7系統引入了系統 ID(CoC ID)。這允許系統識別FoundryVTT文檔,例如技能。此頁面將允許您為現有的{type}文檔設置ID。系統ID應使用名稱的英文翻譯來支持所有語言的本地化。",
"CoC7.Settings.PulpRules.Archetype.Hint": "",
"CoC7.Settings.PulpRules.Organization.Hint": "",
"CoC7.Settings.PulpRules.Talents.Hint": "",
"CoC7.Settings.PulpRules.IgnoreMajorWounds.Hint": ""
}
10 changes: 3 additions & 7 deletions module/chat/cards/damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,11 @@ export class DamageCard extends InteractiveChatCard {
const range = this.range
let formula = this.weapon?.system?.range[range]?.damage
let db = this.actor.db
if (db === null || Number(db) === 0) {
db = ''
} else {
db = `${db}`
}
db = ((db ?? '').toString().trim() === '' ? 0 : db).toString().trim()

if (db && !db.startsWith('-')) db = '+' + db
if (!db.startsWith('-')) db = '+' + db
if (this.weapon.system.properties.addb) formula = formula + db
if (this.weapon.system.properties.ahdb) formula = formula + db + '/2'
if (this.weapon.system.properties.ahdb) formula = formula + '+ floor(' + db + '/2)'

if (formula) {
const maxDamage = new Roll(formula).evaluate({ maximize: true }).total
Expand Down
10 changes: 2 additions & 8 deletions module/scripts/compendium-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ async function performFilter (e) {
export function compendiumFilter () {
Hooks.on('renderCompendium', async (app, html, data) => {
if (app.collection.documentName === 'Item') {
let types = []
if (typeof data.index !== 'undefined') {
// DEPRECIATED IN v11
types = [...new Set(data.index.filter(i => i.name !== '#[CF_tempEntity]').map(item => item.type))]
} else {
await app.collection.getIndex()
types = data.tree.entries.filter(i => i.name !== '#[CF_tempEntity]').map(item => item.type)
}
await app.collection.getIndex()
const types = [...new Set(data.index.filter(i => i.name !== '#[CF_tempEntity]').map(item => item.type))]
const select = []
select.push(
'<option value="">' + game.i18n.localize('CoC7.All') + '</option>'
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "CoC7",
"title": "Call of Cthulhu 7th Edition",
"description": "An implementation of the Call of Cthulhu 7th Edition game system for Foundry Virtual Tabletop.",
"version": "0.10.2",
"version": "0.10.3",
"authors": [
{
"name": "Miskatonic Investigative Society"
Expand Down
2 changes: 1 addition & 1 deletion templates/chat/cards/damage.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 style="text-align: center;font-weight: bolder;" class="item-name card-title"
</div>

<div class="card-content">
{{{weapon.data.data.description.value}}}
{{{weapon.system.description.value}}}
</div>

<div class="options gm-select-only">
Expand Down
4 changes: 2 additions & 2 deletions templates/chat/combat/melee-resolution.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ <h3 style="text-align: center;font-weight: bolder;" class="card-title">{{resultS
{{#if rollDamage}}
<div class="card details">
{{#if looser}}
<h4 style="font-weight: bolder;">{{looser.name}} {{ localize 'CoC7.meleeCombatDamageTakes' }} {{winner.weapon.data.data.range.normal.damage}}{{#if winner.weapon.data.data.properties.addb}}+DB{{/if}}{{#if winner.weapon.data.data.properties.ahdb}}+DB/2{{/if}} {{ localize 'CoC7.meleeCombatDamageFrom' }} {{winner.weapon.name}}</h4>
<h4 style="font-weight: bolder;">{{looser.name}} {{ localize 'CoC7.meleeCombatDamageTakes' }} {{winner.weapon.system.range.normal.damage}}{{#if winner.weapon.system.properties.addb}}+DB{{/if}}{{#if winner.weapon.system.properties.ahdb}}+DB/2{{/if}} {{ localize 'CoC7.meleeCombatDamageFrom' }} {{winner.weapon.name}}</h4>
{{else}}
<h4 style="font-weight: bolder;">{{winner.name}} {{ localize 'CoC7.meleeCombatDamageDeals' }} {{winner.weapon.data.data.range.normal.damage}}{{#if winner.weapon.data.data.properties.addb}}+DB{{/if}}{{#if winner.weapon.data.data.properties.ahdb}}+DB/2{{/if}} {{ localize 'CoC7.meleeCombatDamageWith' }} {{winner.weapon.name}}</h4>
<h4 style="font-weight: bolder;">{{winner.name}} {{ localize 'CoC7.meleeCombatDamageDeals' }} {{winner.weapon.system.range.normal.damage}}{{#if winner.weapon.system.properties.addb}}+DB{{/if}}{{#if winner.weapon.system.properties.ahdb}}+DB/2{{/if}} {{ localize 'CoC7.meleeCombatDamageWith' }} {{winner.weapon.name}}</h4>
{{/if}}
</div>
<div class="card-buttons owner-only" data-actor-id="{{winner.actorKey}}" style="padding: 2px 0;margin: 0;">
Expand Down

0 comments on commit e445f6c

Please sign in to comment.