Add icons and background
BIN
assets/logos/hawkmoon_logo.webp
Normal file
After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 53 KiB |
BIN
assets/tokens/token_hawkmoon_PJ.webp
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
assets/tokens/token_hawkmoon_PNJ.webp
Normal file
After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 45 KiB |
BIN
assets/ui/fond_hawkmoon.webp
Normal file
After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 236 KiB |
@ -154,6 +154,8 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
let autoresult = HawkmoonAutomation.processAutomations("on-drop", item, this.actor)
|
||||
if ( autoresult.isValid ) {
|
||||
super._onDropItem(event, dragData)
|
||||
} else {
|
||||
ui.notifications.warn( autoresult.warningMessage)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,12 +228,18 @@ export class HawkmoonActor extends Actor {
|
||||
return {isValid: false}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
checkCompetenceLevel(compName, minLevel) {
|
||||
checkAttributOrCompetenceLevel(compName, minLevel) {
|
||||
let comp = this.items.find(i => i.type == "competence" && i.name.toLowerCase() == compName.toLowerCase() && i.system.niveau >= minLevel)
|
||||
if ( comp) {
|
||||
return {isValid: true, item: duplicate(comp) }
|
||||
} else {
|
||||
for (let attrKey in this.system.attributs) {
|
||||
if ( this.system.attributs[attrKey].label.toLowerCase() == compName.toLowerCase() && this.system.attributs[attrKey].value >= minLevel ) {
|
||||
return {isValid: true, item: duplicate(this.system.attributs[attrKey]) }
|
||||
}
|
||||
}
|
||||
}
|
||||
return {isValid: false, warningMessage: `Prérequis insuffisant : la compétence ${compName} doit être de niveau ${minLevel} au minimum`}
|
||||
return {isValid: false, warningMessage: `Prérequis insuffisant : la compétence/attribut ${compName} doit être de niveau ${minLevel} au minimum`}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
addCompetenceBonus(compName, bonus, baCost) {
|
||||
|
@ -31,13 +31,22 @@ export class HawkmoonAutomation {
|
||||
if ( !relevantAutomations || relevantAutomations.length == 0) {
|
||||
return {isValid: true}
|
||||
}
|
||||
|
||||
|
||||
let validTab = []
|
||||
for(let auto of relevantAutomations) {
|
||||
if ( event == "on-drop") {
|
||||
return actor.checkCompetenceLevel( auto.competence, auto.minLevel)
|
||||
if ( event == "on-drop") {
|
||||
validTab.push( actor.checkAttributOrCompetenceLevel( auto.competence, auto.minLevel) )
|
||||
}
|
||||
}
|
||||
return {isValid: false}
|
||||
|
||||
// Post process validation array
|
||||
for (let ret of validTab) {
|
||||
if ( !ret.isValid) {
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
return {isValid: true}
|
||||
}
|
||||
|
||||
}
|
@ -1269,7 +1269,7 @@ ul, li {
|
||||
color: #CCC
|
||||
}
|
||||
#pause > img {
|
||||
content: url(../assets/logos/mournblade_logo_chaos.webp);
|
||||
content: url(../assets/logos/hawkmoon_logo.webp);
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
top: -80px;
|
||||
@ -1277,7 +1277,7 @@ ul, li {
|
||||
}
|
||||
|
||||
#logo {
|
||||
content : url(../assets/logos/mournblade_logo_texte.webp);
|
||||
content : url(../assets/logos/hawkmoon_logo.webp);
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
}
|
||||
|