FIX: Manifest, plus added slow
							parent
							
								
									a684e456c5
								
							
						
					
					
						commit
						987f2e228e
					
				
										
											Binary file not shown.
										
									
								
							|  | @ -11,6 +11,7 @@ export class OseActor extends Actor { | |||
| 
 | ||||
|     // Compute modifiers from actor scores
 | ||||
|     this.computeModifiers(); | ||||
|     this._isSlow(); | ||||
| 
 | ||||
|     // Determine Initiative
 | ||||
|     if (game.settings.get("ose", "individualInit")) { | ||||
|  | @ -362,6 +363,19 @@ export class OseActor extends Actor { | |||
|     return mod; | ||||
|   } | ||||
| 
 | ||||
|   _isSlow() { | ||||
|     this.data.data.isSlow = false; | ||||
|     if (this.data.type != 'character') { | ||||
|       return; | ||||
|     } | ||||
|     this.data.items.forEach(item => { | ||||
|       if (item.type == 'weapon' && item.data.slow && item.data.equipped) { | ||||
|         this.data.data.isSlow = true; | ||||
|         return; | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
|   computeModifiers() { | ||||
|     if (this.data.type != "character") { | ||||
|       return; | ||||
|  |  | |||
|  | @ -19,7 +19,12 @@ export class OseCombat { | |||
|      | ||||
|     // Set init
 | ||||
|     for (let i = 0; i < data.combatants.length; ++i) { | ||||
|         data.combatants[i].initiative = groups[data.combatants[i].flags.ose.group].initiative; | ||||
|         console.log(data.combatants[i]); | ||||
|         if (data.combatants[i].actor.data.data.isSlow) { | ||||
|           data.combatants[i].initiative = -1; | ||||
|         } else { | ||||
|           data.combatants[i].initiative = groups[data.combatants[i].flags.ose.group].initiative; | ||||
|         } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
|  | @ -34,5 +34,5 @@ | |||
|   "gridUnits": "ft", | ||||
|   "url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose", | ||||
|   "manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json", | ||||
|   "download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.5.zip" | ||||
|   "download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.6.zip" | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue