Ticket #2009: building-arrows.diff
File building-arrows.diff, 630 bytes (added by , 11 years ago) |
---|
-
binaries/data/mods/public/simulation/components/BuildingAI.js
237 237 else 238 238 { 239 239 //Fire N arrows, 0 <= N <= Number of arrows left 240 arrowsToFire = Math.floor(Math.random() * this.arrowsLeft); 240 arrowsToFire = Math.min( 241 Math.round(2*Math.random() * this.GetArrowCount()/roundCount), 242 this.arrowsLeft 243 ); 241 244 } 242 245 if (this.targetUnits.length > 0) 243 246 {