@@ -67,7 +67,7 @@ spells.wizard = {
6767 cast ( user , target , req ) {
6868 let bonus = statsComputed ( user ) . int * crit . crit ( user , 'per' ) ;
6969 bonus *= Math . ceil ( ( target . value < 0 ? 1 : target . value + 1 ) * 0.075 ) ;
70- user . stats . exp += diminishingReturns ( bonus , 75 ) ;
70+ user . stats . exp += Math . ceil ( diminishingReturns ( bonus , 75 ) ) ;
7171 if ( ! user . party . quest . progress . up ) user . party . quest . progress . up = 0 ;
7272 user . party . quest . progress . up += Math . ceil ( statsComputed ( user ) . int * 0.1 ) ;
7373 updateStats ( user , user . stats , req ) ;
@@ -122,9 +122,9 @@ spells.warrior = {
122122 notes : t ( 'spellWarriorSmashNotes' ) ,
123123 cast ( user , target ) {
124124 const bonus = statsComputed ( user ) . str * crit . crit ( user , 'con' ) ;
125- target . value += diminishingReturns ( bonus , 2.5 , 35 ) ;
125+ target . value += Math . ceil ( diminishingReturns ( bonus , 2.5 , 35 ) ) ;
126126 if ( ! user . party . quest . progress . up ) user . party . quest . progress . up = 0 ;
127- user . party . quest . progress . up += diminishingReturns ( bonus , 55 , 70 ) ;
127+ user . party . quest . progress . up += Math . ceil ( diminishingReturns ( bonus , 55 , 70 ) ) ;
128128 } ,
129129 } ,
130130 defensiveStance : { // Defensive Stance
@@ -174,7 +174,7 @@ spells.rogue = {
174174 notes : t ( 'spellRoguePickPocketNotes' ) ,
175175 cast ( user , target ) {
176176 const bonus = calculateBonus ( target . value , statsComputed ( user ) . per ) ;
177- user . stats . gp += diminishingReturns ( bonus , 25 , 75 ) ;
177+ user . stats . gp += Math . ceil ( diminishingReturns ( bonus , 25 , 75 ) ) ;
178178 } ,
179179 } ,
180180 backStab : { // Backstab
@@ -186,8 +186,8 @@ spells.rogue = {
186186 cast ( user , target , req ) {
187187 const _crit = crit . crit ( user , 'str' , 0.3 ) ;
188188 const bonus = calculateBonus ( target . value , statsComputed ( user ) . str , _crit ) ;
189- user . stats . exp += diminishingReturns ( bonus , 75 , 50 ) ;
190- user . stats . gp += diminishingReturns ( bonus , 18 , 75 ) ;
189+ user . stats . exp += Math . ceil ( diminishingReturns ( bonus , 75 , 50 ) ) ;
190+ user . stats . gp += Math . ceil ( diminishingReturns ( bonus , 18 , 75 ) ) ;
191191 updateStats ( user , user . stats , req ) ;
192192 } ,
193193 } ,
@@ -225,7 +225,7 @@ spells.healer = {
225225 notes : t ( 'spellHealerHealNotes' ) ,
226226 cast ( user , target , req ) {
227227 if ( user . stats . hp >= 50 ) throw new NotAuthorized ( t ( 'messageHealthAlreadyMax' ) ( req . language ) ) ;
228- user . stats . hp += ( statsComputed ( user ) . con + statsComputed ( user ) . int + 5 ) * 0.075 ;
228+ user . stats . hp += Math . ceil ( ( statsComputed ( user ) . con + statsComputed ( user ) . int + 5 ) * 0.075 ) ;
229229 if ( user . stats . hp > 50 ) user . stats . hp = 50 ;
230230 } ,
231231 } ,
@@ -238,7 +238,7 @@ spells.healer = {
238238 cast ( user , tasks ) {
239239 each ( tasks , task => {
240240 if ( task . type !== 'reward' ) {
241- task . value += 4 * ( statsComputed ( user ) . int / ( statsComputed ( user ) . int + 40 ) ) ;
241+ task . value += Math . ceil ( 4 * ( statsComputed ( user ) . int / ( statsComputed ( user ) . int + 40 ) ) ) ;
242242 }
243243 } ) ;
244244 } ,
@@ -263,7 +263,7 @@ spells.healer = {
263263 notes : t ( 'spellHealerHealAllNotes' ) ,
264264 cast ( user , target ) {
265265 each ( target , member => {
266- member . stats . hp += ( statsComputed ( user ) . con + statsComputed ( user ) . int + 5 ) * 0.04 ;
266+ member . stats . hp += Math . ceil ( ( statsComputed ( user ) . con + statsComputed ( user ) . int + 5 ) * 0.04 ) ;
267267 if ( member . stats . hp > 50 ) member . stats . hp = 50 ;
268268 } ) ;
269269 } ,
0 commit comments