You may remember my Bracketmaker. I've seen a lot of love for it, and I still had this handy-dandy Damage Calculator stored somewhere. Instructions for use:
1) Get mIRC if you haven't already and open it
2) Go to the Remote by pressing Alt-R
3) Paste the code below
4) Click OK
5) Make sure your Remote is activated. Type /remote on
6) Press F5 and enjoy!
My favourite feature is where the thing calculates the chance the defending Pokemon survives the attack. You can see the outcome of an attack with every single of the 37 RN possibilities. I used this thing for the Magic Stat Numbers guide.
1) Get mIRC if you haven't already and open it
2) Go to the Remote by pressing Alt-R
3) Paste the code below
4) Click OK
5) Make sure your Remote is activated. Type /remote on
6) Press F5 and enjoy!
My favourite feature is where the thing calculates the chance the defending Pokemon survives the attack. You can see the outcome of an attack with every single of the 37 RN possibilities. I used this thing for the Magic Stat Numbers guide.
Code:
alias damcalcer { dialog -m damcalcer damcalcer }
alias f5 { damcalcer }
dialog damcalcer {
title "Mekkah's Damage Calculator"
size -l -l 400 260
option dbu
box "", 501, 5 5 95 60
text "Level", 1, 10 15 40 10
edit "", 2, 55 15 20 10
text "Attack", 3, 10 30 40 10
edit "", 4, 55 30 20 10
text "Base Power", 5, 10 45 40 10
edit "", 6, 55 45 20 10
box "", 502, 5 65 90 30
text "Defense", 7, 10 72 40 10
edit "", 8, 55 72 20 10
text "HP", 17, 10 82 40 10
edit "", 18, 55 82 20 10
box "", 503, 5 95 90 65
;STAB, 1.1-items, Choice Band, traits, typing
text "STAB", 9, 10 100 40 10
combo 10, 55 100 30 10, drop
text "Item", 11, 10 115 40 10
combo 12, 55 115 30 10, drop
text "Choice Band", 13, 10 130 40 10
combo 14, 55 130 30 10, drop
text "Typing", 15, 10 145 40 10
combo 16, 55 145 30 10, drop
box "", 504, 105 5 140 225
text "Rand", 20, 110 15 25 10
text "Damage", 21, 160 15 40 10
text "Percentage", 22, 200 15 30 10
text "217", 31, 110 25 20 10
text "218", 32, 110 35 20 10
text "219", 33, 110 45 20 10
text "220", 34, 110 55 20 10
text "221", 35, 110 65 20 10
text "222", 36, 110 75 20 10
text "223", 37, 110 85 20 10
text "224", 38, 110 95 20 10
text "225", 39, 110 105 20 10
text "226", 40, 110 115 20 10
text "227", 41, 110 125 20 10
text "228", 42, 110 135 20 10
text "229", 43, 110 145 20 10
text "230", 44, 110 155 20 10
text "231", 45, 110 165 20 10
text "232", 46, 110 175 20 10
text "233", 47, 110 185 20 10
text "234", 48, 110 195 20 10
text "235", 49, 110 205 20 10
text "", 90, 160 25 20 10
text "", 91, 160 35 20 10
text "", 92, 160 45 20 10
text "", 93, 160 55 20 10
text "", 94, 160 65 20 10
text "", 95, 160 75 20 10
text "", 96, 160 85 20 10
text "", 97, 160 95 20 10
text "", 98, 160 105 20 10
text "", 99, 160 115 20 10
text "", 100, 160 125 20 10
text "", 101, 160 135 20 10
text "", 102, 160 145 20 10
text "", 103, 160 155 20 10
text "", 104, 160 165 20 10
text "", 105, 160 175 20 10
text "", 106, 160 185 20 10
text "", 107, 160 195 20 10
text "", 108, 160 205 20 10
text "", 109, 195 25 20 10
text "", 110, 195 35 20 10
text "", 111, 195 45 20 10
text "", 112, 195 55 20 10
text "", 113, 195 65 20 10
text "", 114, 195 75 20 10
text "", 115, 195 85 20 10
text "", 116, 195 95 20 10
text "", 117, 195 105 20 10
text "", 118, 195 115 20 10
text "", 119, 195 125 20 10
text "", 120, 195 135 20 10
text "", 121, 195 145 20 10
text "", 122, 195 155 20 10
text "", 123, 195 165 20 10
text "", 124, 195 175 20 10
text "", 125, 195 185 20 10
text "", 126, 195 195 20 10
text "", 127, 195 205 20 10
box "", 505, 245 5 140 225
text "Rand", 71, 250 15 25 10
text "Damage", 72, 295 15 40 10
text "Percentage", 73, 340 15 30 10
text "236", 50, 250 25 20 10
text "237", 51, 250 35 20 10
text "238", 52, 250 45 20 10
text "239", 53, 250 55 20 10
text "240", 54, 250 65 20 10
text "241", 55, 250 75 20 10
text "242", 56, 250 85 20 10
text "243", 57, 250 95 20 10
text "244", 58, 250 105 20 10
text "245", 59, 250 115 20 10
text "246", 60, 250 125 20 10
text "247", 61, 250 135 20 10
text "248", 62, 250 145 20 10
text "249", 63, 250 155 20 10
text "250", 64, 250 165 20 10
text "251", 65, 250 175 20 10
text "252", 66, 250 185 20 10
text "253", 67, 250 195 20 10
text "254", 68, 250 205 20 10
text "255", 69, 250 215 20 10
text "", 128, 295 25 20 10
text "", 129, 295 35 20 10
text "", 130, 295 45 20 10
text "", 131, 295 55 20 10
text "", 132, 295 65 20 10
text "", 133, 295 75 20 10
text "", 134, 295 85 20 10
text "", 135, 295 95 20 10
text "", 136, 295 105 20 10
text "", 137, 295 115 20 10
text "", 138, 295 125 20 10
text "", 139, 295 135 20 10
text "", 140, 295 145 20 10
text "", 141, 295 155 20 10
text "", 142, 295 165 20 10
text "", 143, 295 175 20 10
text "", 144, 295 185 20 10
text "", 145, 295 195 20 10
text "", 146, 295 205 20 10
text "", 147, 295 215 20 10
text "", 148, 340 25 20 10
text "", 149, 340 35 20 10
text "", 150, 340 45 20 10
text "", 151, 340 55 20 10
text "", 152, 340 65 20 10
text "", 153, 340 75 20 10
text "", 154, 340 85 20 10
text "", 155, 340 95 20 10
text "", 156, 340 105 20 10
text "", 157, 340 115 20 10
text "", 158, 340 125 20 10
text "", 159, 340 135 20 10
text "", 160, 340 145 20 10
text "", 161, 340 155 20 10
text "", 162, 340 165 20 10
text "", 163, 340 175 20 10
text "", 164, 340 185 20 10
text "", 165, 340 195 20 10
text "", 166, 340 205 20 10
text "", 167, 340 215 20 10
box "", 506, 5 160 90 50
text "Rand", 74, 10 165 20 10
text "Damage", 75, 30 165 20 10
text "Percentage", 76, 55 165 30 10
text "217", 77, 10 175 20 10
text "236", 78, 10 185 20 10
text "255", 79, 10 195 20 10
text "", 80, 30 175 20 10
text "", 81, 30 185 20 10
text "", 82, 30 195 20 10
text "", 83, 55 175 20 10
text "", 84, 55 185 20 10
text "", 85, 55 195 20 10
button "Calculate", 510, 5 215 90 10
box "", 507, 5 230 85 30
text "", 201, 10 235 50 10
text "", 202, 10 245 50 10
}
on *:dialog:damcalcer:init:0: {
did -a damcalcer 10 1
did -a damcalcer 10 1.5
did -a damcalcer 12 1
did -a damcalcer 12 1.1
did -a damcalcer 14 1
did -a damcalcer 14 1.5
did -a damcalcer 16 0.25
did -a damcalcer 16 0.5
did -a damcalcer 16 1
did -a damcalcer 16 2
did -a damcalcer 16 4
}
on *:dialog:damcalcer:sclick:510: {
cp1
calcsimple
cp2
cp3
surv
}
alias cp1 {
var %a $int($calc(0.4 * $did(damcalcer,2)))
var %b $calc(%a + 2)
var %c $calc( %b * $did(damcalcer,4) * $did(damcalcer,6) )
var %d $int($calc( %c / $did(damcalcer,8) ))
var %e $int($calc( %d / 50 ))
var %f $calc( %e + 2 )
var %g $int($calc( %f * $did(damcalcer,10) ))
var %h $int($calc( %g * $did(damcalcer,12) ))
var %i $int($calc( %h * $did(damcalcer,14) ))
var %j $int($calc( %i * $did(damcalcer,16) ))
set %dam1 %j
}
alias calcsimple {
var %dam.ave $calc( ( %dam1 * 236 ) / 255 ))
var %dam.min $calc( ( %dam1 * 217 ) / 255 ))
did -o damcalcer 80 1 $int( $calc( ( %dam1 * 217 ) / 255 ) )
did -o damcalcer 81 1 $int( $calc( ( %dam1 * 236 ) / 255 ) )
did -o damcalcer 82 1 $int( %dam1 )
did -o damcalcer 83 1 $round( $calc( ( %dam.min / $did(damcalcer,18) ) * 100 ) ,2)
did -o damcalcer 84 1 $round( $calc( ( %dam.ave / $did(damcalcer,18) ) * 100 ) ,2)
did -o damcalcer 85 1 $round( $calc( ( %dam1 / $did(damcalcer,18) ) * 100 ) ,2)
}
alias cp2 {
var %didno 90
while ( %didno < 109 ) {
var %randno $calc( %didno + 127 )
did -o damcalcer %didno 1 $int( $calc( ( %dam1 * %randno ) / 255 ) )
inc %didno
}
var %pdidno 109
while ( %pdidno < 128 ) {
var %prandno $calc( %pdidno + 108 )
did -o damcalcer %pdidno 1 $round( $calc( ( ( %dam1 * %prandno ) / 255 ) / $did(damcalcer,18) * 100) ,2)
inc %pdidno
}
}
alias cp3 {
var %didno 128
while ( %didno < 148 ) {
var %randno $calc( %didno + 108 )
did -o damcalcer %didno 1 $int( $calc( ( %dam1 * %randno ) / 255 ) )
inc %didno
}
var %pdidno 148
while ( %pdidno < 168 ) {
var %prandno $calc( %pdidno + 88 )
did -o damcalcer %pdidno 1 $round( $calc( ( ( %dam1 * %prandno ) / 255 ) / $did(damcalcer,18) * 100) ,2)
inc %pdidno
}
}
alias surv {
var %hp $did(damcalcer,18)
var %rander 217
:loop
if ( %rander < 256 ) {
var %s1 $int( $calc( %dam1 * %rander ) )
var %s2 $calc( %s1 / 255 )
if ( %s2 < %hp ) {
inc %rander
goto loop
}
else {
var %s3 $calc( 255 - %rander )
var %s4 $calc( 38 - %s3 )
var %s5 $calc( ( %s4 / 38 ) * 100 )
did -o damcalcer 201 1 %s4 out of 38
did -o damcalcer 202 1 $round(%s5,2) % chance
goto end2
}
}
else { goto end }
:end
did -o damcalcer 201 1 38 out of 38
did -o damcalcer 202 1 100 % chance
:end2
}