@@ -23,7 +23,7 @@ if (world_config.hasMinFakeLimit) {
2323}
2424
2525if ( user_data . place . attackLinks . fakePlaceLink && units [ 'total' ] >= minFake ) {
26- createRallyPointScript ( linksContainer , world_data . units , trans . sp . place . attackLinkNames . fake , 0 , function ( amount , v , tag ) {
26+ createRallyPointScript ( linksContainer , world_data . units , user_data . place . attackLinks . fakePlaceLinkName , 0 , function ( amount , v , tag ) {
2727 if ( ( v == 'ram' || v == 'catapult' ) && ! tag . rammed && amount > 0 ) {
2828 tag . rammed = true ;
2929 return 1 ;
@@ -75,8 +75,8 @@ $.each(user_data.place.customPlaceLinks, function (i, v) {
7575 }
7676 if ( send > 0 && ! tag . ignoreNobles ) {
7777 $ . each ( user_data . place . attackLinks . nobleSupport , function ( i , val ) {
78- if ( unitVal == val . Unit && villageType . isMatch ( val . VillageType ) ) {
79- send -= Math . ceil ( units . snob * ( val . Population / world_data . unitsSize [ 'unit_' + unitVal ] ) ) ;
78+ if ( unitVal == val . unit && villageType . isMatch ( val . villageType ) ) {
79+ send -= Math . ceil ( units . snob * val . amount ) ;
8080 }
8181 } ) ;
8282 }
@@ -118,49 +118,51 @@ $.each(user_data.place.customPlaceLinks, function (i, v) {
118118if ( units . spy >= user_data . place . attackLinks . scoutVillage && user_data . place . attackLinks . scoutPlaceLinks != null && user_data . place . attackLinks . scoutPlaceLinks . length > 0 ) {
119119 $ . each ( user_data . place . attackLinks . scoutPlaceLinks , function ( i , v ) {
120120 if ( units . spy >= v ) {
121- createRallyPointScript ( linksContainer , [ "spy" ] , trans . sp . place . attackLinkNames . scout + v , 0 , function ( amount , v , tag ) {
121+ createRallyPointScript ( linksContainer , [ "spy" ] , user_data . place . attackLinks . scoutPlaceLinksName . replace ( "{amount}" , v ) , 0 , function ( amount , v , tag ) {
122122 return tag ;
123123 } , v ) ;
124124 }
125125 } ) ;
126126}
127127
128128if ( units . snob > 0 && user_data . place . attackLinks . noblePlaceLink ) {
129- createRallyPointScript ( linksContainer , world_data . units , trans . sp . place . attackLinkNames . nobleMax , 0 , function ( amount , v , tag ) {
130- if ( v == 'snob' ) {
131- return 1 ;
132- }
133- if ( tag > 0 ) {
134- var returned = null ;
135- $ . each ( user_data . place . attackLinks . nobleSupport , function ( i , val ) {
136- if ( v == val . Unit && villageType . isMatch ( val . VillageType ) ) {
137- returned = amount - Math . ceil ( ( tag - 1 ) * ( val . Population / world_data . unitsSize [ 'unit_' + v ] ) ) ;
138- }
139- } ) ;
140- if ( returned != null ) {
141- return returned ;
142- }
143- }
144- return amount ;
145- } , units . snob ) ;
129+ if ( user_data . place . attackLinks . noblePlaceLinkFirstName ) {
130+ createRallyPointScript ( linksContainer , world_data . units , user_data . place . attackLinks . noblePlaceLinkFirstName , 0 , function ( amount , v , tag ) {
131+ if ( v == 'snob' ) {
132+ return 1 ;
133+ }
134+ if ( tag > 0 ) {
135+ var returned = null ;
136+ $ . each ( user_data . place . attackLinks . nobleSupport , function ( i , val ) {
137+ if ( v == val . unit && villageType . isMatch ( val . villageType ) ) {
138+ returned = amount - Math . ceil ( ( tag - 1 ) * val . amount ) ;
139+ }
140+ } ) ;
141+ if ( returned != null ) {
142+ return returned ;
143+ }
144+ }
145+ return amount ;
146+ } , units . snob ) ;
147+ }
146148
147- if ( units . snob > 1 || user_data . place . attackLinks . noblePlaceLinksForceShow ) {
148- createRallyPointScript ( linksContainer , world_data . units , trans . sp . place . attackLinkNames . nobleMin , 0 , function ( amount , v , tag ) {
149+ if ( user_data . place . attackLinks . noblePlaceLinkSupportName && ( units . snob > 1 || user_data . place . attackLinks . noblePlaceLinksForceShow ) ) {
150+ createRallyPointScript ( linksContainer , world_data . units , user_data . place . attackLinks . noblePlaceLinkSupportName , 0 , function ( amount , v , tag ) {
149151 if ( v == 'snob' ) {
150152 return 1 ;
151153 }
152154 var returned = 0 ;
153155 $ . each ( user_data . place . attackLinks . nobleSupport , function ( i , val ) {
154- if ( v == val . Unit && villageType . isMatch ( val . VillageType ) ) {
155- returned = Math . ceil ( 1 * ( val . Population / world_data . unitsSize [ 'unit_' + v ] ) ) ;
156+ if ( v == val . unit && villageType . isMatch ( val . villageType ) ) {
157+ returned = Math . ceil ( 1 * val . amount ) ;
156158 }
157159 } ) ;
158160 return returned ;
159161 } ) ;
160162 }
161163
162- if ( units . snob > 0 ) {
163- createRallyPointScript ( linksContainer , world_data . units , trans . sp . place . attackLinkNames . nobleDivide , 0 , function ( amount , v , tag ) {
164+ if ( units . snob > 0 && user_data . place . attackLinks . noblePlaceLinkDivideName ) {
165+ createRallyPointScript ( linksContainer , world_data . units , user_data . place . attackLinks . noblePlaceLinkDivideName , 0 , function ( amount , v , tag ) {
164166 if ( v == 'snob' ) {
165167 return 1 ;
166168 }
0 commit comments