Skip to content
Open

5.6.0 #299

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
20 changes: 11 additions & 9 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"DL.BecomeStunned": "You become stunned for {round} round.",
"DL.ButtonEdit": "Edit",
"DL.ButtonView": "View",
"DL.CanSeeSoureOfAffliction" : "Can see the source of the affliction",
"DL.CanSeeSoureOfAffliction": "Can see the source of the affliction",
"DL.ChallengeRequestRollText": "Request Challenge Roll",
"DL.ChallengeRoll": "Challenge Roll",
"DL.ChallengeRollBonus": "Challenge Roll Bonus",
Expand Down Expand Up @@ -315,10 +315,10 @@
"DL.DialogDeleteTraditionText": "The Tradition and all spells attached will be permanently deleted.",
"DL.DialogDeleteTraitText": "The Trait will be permanently deleted.",
"DL.DialogDeleteCreatureRoleText": "The Creature Role will be permanently deleted.",
"DL.DialogDoYouSeeThisCreatureFirstTime":"Do you you see this creature first time?",
"DL.DialogDoYouSeeTheseCreaturesFirstTime":"Do you you see these creatures first time?",
"DL.DialogDoYouStartYourTurnWithLOSCreature":"Do you start your turn with line of sight to the following creature?",
"DL.DialogDoYouStartYourTurnWithLOSCreatures":"Do you start your turn with line of sight to the following creatures?",
"DL.DialogDoYouSeeThisCreatureFirstTime": "Do you you see this creature first time?",
"DL.DialogDoYouSeeTheseCreaturesFirstTime": "Do you you see these creatures first time?",
"DL.DialogDoYouStartYourTurnWithLOSCreature": "Do you start your turn with line of sight to the following creature?",
"DL.DialogDoYouStartYourTurnWithLOSCreatures": "Do you start your turn with line of sight to the following creatures?",
"DL.DialogInvalidRollFormula": "Invalid Roll Formula: {rollFormula}!",
"DL.DialogEffectsWillNotExpire": "Source actor is not on the scene! Effects with special duration 'TurnStartSource' and 'TurnEndSource' will NOT expire.",
"DL.DialogFortuneAwarded": "Awarded a Fortune point.",
Expand Down Expand Up @@ -370,7 +370,7 @@
"DL.DialogWarningActorsNotSelected": "Actor(s) not selected",
"DL.DialogWarningActorsNotTargeted": "Actor(s) not targeted",
"DL.DialogWarningAfflictionFromEffect": "Affliction is applied from effect. Remove the effect to remove the affliction.",
"DL.DialogWarningAlreadyMadeWILLImmune": "You've already made a Will challenge roll against {creature} and you are immune to its {trait} trait.",
"DL.DialogWarningAlreadyMadeWILLImmune": "You've already made a Will challenge roll against {creature} and you are immune to its {trait} trait.",
"DL.DialogWarningAlreadyMadeWILLFrightened": "You've already made a Will challenge roll against {creature} and you are already frightened.",
"DL.DialogWarningBlindedChallengeFailer": "You're blinded and perception challenge rolls result in failure.",
"DL.DialogWarningCreatureArmor": "You can't add armor to a creature. Change the Defense value manually.",
Expand All @@ -380,7 +380,7 @@
"DL.DialogWarningStunnedFailer": "You're stunned and cannot use actions or move, and all your challenge rolls result in failure.",
"DL.DialogWarningSurprisedFailer": "You're surprised and cannot use actions or move, and all your challenge rolls result in failure.",
"DL.DialogWarningTargetNotHorrifying": "{target} not horrifying.",
"DL.DialogWarningTargetNeitherFnorH":"{target} is neither frightening nor horrifying.",
"DL.DialogWarningTargetNeitherFnorH": "{target} is neither frightening nor horrifying.",
"DL.DialogWarningTargetNotSelected": "Target not selected",
"DL.DialogWarningTargetNotTargeted": "Target not chosen",
"DL.DialogWarningUnconsciousFailer": "You're unconscious and cannot use actions or move, and all your challenge rolls result in failure.",
Expand Down Expand Up @@ -413,8 +413,8 @@
"DL.FrighteningHorrifyingEditor": "Frightening / Horrifying Trait Editor",
"DL.FrightenedYou": "{creature} frightened you.",
"DL.FrightenedBy": "Frightened by {creature}",
"DL.GainedInsanity" : "You gain {insanity} Insanity.",
"DL.GainedInsanityAndGoMad" : "You gain {insanity} Insanity and go mad.",
"DL.GainedInsanity": "You gain {insanity} Insanity.",
"DL.GainedInsanityAndGoMad": "You gain {insanity} Insanity and go mad.",
"DL.GMTools": "GM Tools",
"DL.GMnote": "GM Notes",
"DL.GMnoteEdit": "Edit GM Note",
Expand Down Expand Up @@ -627,6 +627,8 @@
"DL.SettingConfirmCreatureRoleRemovalHint": "Show a confirmation dialog when attempting to remove a creature role from a character of level 1 or higher.",
"DL.SettingConvertIntoBadge": "Convert icons into badges.",
"DL.SettingConvertIntoBadgeHint": "Surround ancestry and path icons with a badge background.",
"DL.SettingDarkMagicCorruptionRollOnLearn": "Roll corruption on new dark magic tradition",
"DL.SettingDarkMagicCorruptionRollOnLearnHint": "Automatically make a corruption roll when discovering a dark magic trdition.",
"DL.SettingDSN": "Dice So Nice! Configuration",
"DL.SettingDSN3d": "Use Roman numerals on d3",
"DL.SettingDSN3dHint": "When using Demonlord dice-set on d3, Arabic numerals are replaced with Roman numerals. (Require refresh).",
Expand Down
4 changes: 3 additions & 1 deletion src/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,9 @@
"DL.SettingConfirmCreatureRoleRemoval": "Confirmar eliminación de rol de criatura",
"DL.SettingConfirmCreatureRoleRemovalHint": "Muestra un diálogo de confirmación al intentar borrar un rol de criatura de una criatura.",
"DL.SettingConvertIntoBadge": "Convertir en insignia.",
"DL.SettingConvertIntoBadgeHint": "Rodear los icono de linaje y senda con un fondo de insignia.",
"DL.SettingConvertIntoBadgeHint": "Rodear los iconos de linaje y senda con un fondo de insignia.",
"DL.SettingDarkMagicCorruptionRollOnLearn": "Tirar corrupción con nueva tradición de magia oscura",
"DL.SettingDarkMagicCorruptionRollOnLearnHint": "Hacer un desafío de corrupción automáticamente al descubrir una nueva tradición de magia oscura.",
"DL.SettingDSN": "Configuración de Dice So Nice!",
"DL.SettingDSN3d": "Usar números romanos en el d3",
"DL.SettingDSN3dHint": "Cuando se use el set de dados de Demonlord on d3, los números arabicos son reemplazados por números romanos. (Requiere actualizar la página).",
Expand Down
10 changes: 10 additions & 0 deletions src/module/actor/sheets/character-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ export default class DLCharacterSheet extends DLBaseActorSheet {
}
}
})
} else if (item.type === 'spell') {
if (item.system.isDarkMagic) {
if (game.settings.get('demonlord', 'darkMagicCorruptionRollOnLearn')) {
// If the spell is dark magic from a new tradition, trigger a corruption roll
const knownDarkMagicTraditions = Object.keys(Object.groupBy(game.actors.getName("Test").spells.filter(s => s.system.isDarkMagic), s => s.system.tradition))
if (!knownDarkMagicTraditions.includes(item.system.tradition)) {
await this.actor.rollCorruption()
}
}
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/module/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,4 +963,12 @@ export const registerSettings = function () {
type: Boolean,
config: true
})
game.settings.register('demonlord', 'darkMagicCorruptionRollOnLearn', {
name: game.i18n.localize('DL.SettingDarkMagicCorruptionRollOnLearn'),
hint: game.i18n.localize('DL.SettingDarkMagicCorruptionRollOnLearnHint'),
default: false,
scope: 'world',
type: Boolean,
config: true
})
}