small exp tweak, grunt for spells

This commit is contained in:
Tyler Renelle 2013-12-20 00:10:46 -07:00
parent ad325bce92
commit edd65568d0
3 changed files with 30 additions and 62 deletions

View file

@ -10022,7 +10022,7 @@ var global=self;/**
target: 'task',
notes: 'With a crack, flames burst from your staff, scorching a task. You deal much higher damage to the task and gain additional experience.',
cast: function(user, target) {
target.value += user._statsComputed.int * .02 * crit(user, 'per');
target.value += user._statsComputed.int * .0075 * crit(user, 'per');
return user.stats.exp += Math.abs(target.value);
}
},
@ -10078,7 +10078,7 @@ var global=self;/**
target: 'task',
notes: "You savagely hit a single task with all of your might, beating it into submission. The task's redness decreases.",
cast: function(user, target) {
return target.value += user._statsComputed.str * .03;
return target.value += user._statsComputed.str * .01 * crit(user, 'per');
}
},
defensiveStance: {
@ -10172,7 +10172,7 @@ var global=self;/**
},
stealth: {
text: 'Stealth',
mana: 30,
mana: 45,
lvl: 9,
target: 'self',
notes: "You duck into the shadows, pulling up your hood. Many dailies won't find you this night; fewer yet the higher your Perception.",
@ -10181,7 +10181,7 @@ var global=self;/**
if ((_base = user.stats.buffs).stealth == null) {
_base.stealth = 0;
}
return user.stats.buffs.stealth = Math.ceil(user._statsComputed.per * .075);
return user.stats.buffs.stealth = Math.ceil(user._statsComputed.per * .03);
}
}
},
@ -10210,7 +10210,7 @@ var global=self;/**
if (target.type === 'reward') {
return;
}
return target.value += user._statsComputed.int * .02;
return target.value += user._statsComputed.int * .075;
});
}
},
@ -11577,7 +11577,7 @@ var process=require("__browserify_process");(function() {
var afterStreak, crit, gpMod, intMod, streakBonus;
crit = user.fns.predictableRandom() <= .03 ? 1.5 + (.05 * user._statsComputed.str) : 1;
intMod = 1 + (user._statsComputed.int * .075);
stats.exp += Math.round(delta * intMod * task.priority * crit * 7.5);
stats.exp += Math.round(delta * intMod * task.priority * crit * 6);
gpMod = delta * task.priority * crit;
gpMod *= 1 + user._statsComputed.per * .06;
return stats.gp += task.streak ? (streakBonus = task.streak / 100 + 1, afterStreak = gpMod * streakBonus, gpMod > 0 ? user._tmp.streakBonus = afterStreak - gpMod : void 0, afterStreak) : gpMod;

View file

@ -418,7 +418,7 @@ api.wrap = (user) ->
task = user.tasks[req.params?.id]
return cb({code:404,message:'Task not found'}) unless task
i = user[task.type + "s"].indexOf(task)
user[task.type + "s"].splice i, 1 if ~i
user[task.type + "s"].splice(i, 1) if ~i
cb null, req
addTask: (req, cb) ->
@ -689,7 +689,7 @@ api.wrap = (user) ->
# ===== Intelligence =====
# TODO Increases Experience gain by .2% per point.
intMod = 1 + (user._statsComputed.int * .075)
stats.exp += Math.round(delta * intMod * task.priority * crit * 7.5)
stats.exp += Math.round(delta * intMod * task.priority * crit * 6)
# GP modifier
gpMod = delta * task.priority * crit

View file

@ -1,42 +1,9 @@
###
1) clone the repo
2) npm install
3) coffee ./node_modules/habitrpg-shared/tests/math_samples.coffee
3) coffee ./tests/math_samples.coffee
exp here is `gained/TNL`
lvl exp hp gp task.value
1 8/150 50 1.06 1.16 ( Δ1.00)
1 8/150 49.1 1.06 -1.00 ( Δ-1.00)
------------------------------------------------------------
11 17/280 50 1.96 1.24 ( Δ1.00)
11 17/280 49.2 1.96 -1.00 ( Δ-1.00)
------------------------------------------------------------
21 115/460 50 13.23 1.31 ( Δ1.00)
21 115/460 49.2 13.23 -1.00 ( Δ-1.00)
------------------------------------------------------------
31 33/690 50 3.76 1.39 ( Δ1.00)
31 33/690 49.3 3.76 -1.00 ( Δ-1.00)
------------------------------------------------------------
41 42/970 50 4.66 1.46 ( Δ1.00)
41 42/970 49.3 4.66 -1.00 ( Δ-1.00)
------------------------------------------------------------
51 50/1300 50 5.56 1.54 ( Δ1.00)
51 50/1300 49.4 5.56 -1.00 ( Δ-1.00)
------------------------------------------------------------
61 59/1680 50 6.46 1.61 ( Δ1.00)
61 59/1680 49.5 6.46 -1.00 ( Δ-1.00)
------------------------------------------------------------
71 67/2110 50 7.36 1.69 ( Δ1.00)
71 67/2110 49.5 7.36 -1.00 ( Δ-1.00)
------------------------------------------------------------
81 76/2590 50 8.26 1.76 ( Δ1.00)
81 76/2590 49.6 8.26 -1.00 ( Δ-1.00)
------------------------------------------------------------
91 84/3120 50 9.16 1.84 ( Δ1.00)
91 84/3120 49.6 9.16 -1.00 ( Δ-1.00)
------------------------------------------------------------
Current results at https://gist.github.com/lefnire/8049676
###
shared = require '../script/index.coffee'
@ -56,7 +23,7 @@ user =
shield: 'shield_warrior_4'
head: 'head_warrior_4'
habits: [
shared.taskDefaults({id, value: -4})
shared.taskDefaults({id, value: 0})
]
dailys: []
todos: []
@ -66,6 +33,7 @@ shared.wrap(user)
s = user.stats
task = user.tasks[id]
party = [user]
taskValue = -10
clearUser = (i=1) ->
_.merge user.stats, {exp:0, gp:0, hp:50, lvl:i, str:i, con:i, per:i, int:i, mp: 100}
@ -75,84 +43,84 @@ _.times 10, (n) ->
console.log "lvl\t\texp\t\thp\t\tgp\t\ttask.value"
i = n*10 + 1
clearUser(i)
task.value = 0
task.value = taskValue
delta = user.ops.score params:{id, direction:'up'}
console.log "#{s.lvl}\t\t#{s.exp}/#{shared.tnl(s.lvl)}\t\t#{s.hp}\t\t#{s.gp.toFixed(2)}\t\t#{task.value.toFixed(2)} (↑ Δ#{delta.toFixed(2)})"
task.value = 0
task.value = taskValue
delta = user.ops.score params:{id, direction:'down'}
console.log "#{s.lvl}\t\t#{s.exp}/#{shared.tnl(s.lvl)}\t\t#{s.hp}\t\t#{s.gp.toFixed(2)}\t\t#{task.value.toFixed(2)} (↓ Δ#{delta.toFixed(2)})"
console.log '[Wizard]'
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.wizard.fireball.cast(user,task)
console.log "fireball: task.value=#{task.value} hp=#{s.exp}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.wizard.mpheal.cast(user,party)
console.log "mpheal: mp=#{s.mp} (from 100)"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.wizard.earth.cast(user,party)
console.log "earth: buffs.int=#{s.buffs.int}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.wizard.frost.cast(user,{})
console.log "frost: -"
console.log '[Warrior]'
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.warrior.smash.cast(user,task)
console.log "smash: task.value=#{task.value}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.warrior.defensiveStance.cast(user,{})
console.log "defensiveStance: buffs.con=#{s.buffs.con}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.warrior.valorousPresence.cast(user,party)
console.log "valorousPresence: buffs.str=#{s.buffs.str}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.warrior.intimidate.cast(user,party)
console.log "intimidate: buffs.con=#{s.buffs.con}"
console.log '[Rogue]'
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.rogue.pickPocket.cast(user,task)
console.log "pickPocket: gp=#{s.gp}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.rogue.backStab.cast(user,task)
console.log "backStab: task.value=#{task.value} exp=#{s.exp} gp=#{s.gp}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.rogue.toolsOfTrade.cast(user,party)
console.log "toolsOfTrade: buffs.per=#{s.buffs.per}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.rogue.stealth.cast(user,{})
console.log "stealth: avoiding #{user.stats.buffs.stealth} tasks"
console.log '[Healer]'
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
s.hp=0
shared.content.spells.healer.heal.cast(user,{})
console.log "heal: hp=#{s.hp}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.healer.brightness.cast(user,{})
console.log "brightness: task.value=#{task.value}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
shared.content.spells.healer.protectAura.cast(user,party)
console.log "protectAura: buffs.con=#{s.buffs.con}"
task.value = 0;clearUser(i)
task.value = taskValue;clearUser(i)
s.hp=0
shared.content.spells.healer.heallAll.cast(user,party)
console.log "heallAll: hp=#{s.hp}"