Sync to v7.2.0
This commit is contained in:
		
							
								
								
									
										19
									
								
								scripts/IzoOmDywGLqLNljN.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								scripts/IzoOmDywGLqLNljN.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| let skill = `Langue (Magick)` | ||||
| let currentCareer = this.actor.system.currentCareer; | ||||
| let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill); | ||||
|  | ||||
| if (!currentCareer) return | ||||
|  | ||||
|  | ||||
| let inCurrentCareer = currentCareer.system.skills.includes(skill); | ||||
| let witchAdded = actor.getFlag("wfrp4e", "witchAdded") || {}; | ||||
| if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name]) | ||||
| { | ||||
| 	existingSkill.system.advances.costModifier = -5; | ||||
| } | ||||
| else  | ||||
| { | ||||
| 	witchAdded[skill] = true; | ||||
| 	currentCareer.system.skills.push(skill); | ||||
| 	setProperty(this.actor, "flags.wfrp4e.witchAdded", witchAdded) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user