Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Blogs » Fiesty and Short

Once upon a time, a casual tank formed a raid coalition for BC. Stuff happened.
Rate this Entry

stasiscl Tricks, Volume II

Posted 06/19/08 at 8:50 PM by Abbi
Sort of by request. I feel sloppy about this because it's not really an accurate model of ret pallie damage bonus; I'm just taking all the damage done by people with Sanctity Aura on and dividing it by 1.02, and taking all the damage done to mobs with Judgement of the Crusader on 'em and dividing that by 1.03, and claiming that's more or less representative of how much damage the raid would have done without the ret pallie along. Which is bogus, but possibly good enough for government work, and someone asked.

My code is still not that great.

Code:
#!/usr/bin/perl

use lib 'lib';
use Stasis::Parser;

$parser = Stasis::Parser->new(version => 2);

$debug = 0;

my %damage_actions = (
    SWING_DAMAGE => 1,
    RANGE_DAMAGE => 1,
    SPELL_DAMAGE => 1,
    DAMAGE_SPLIT => 1,
    SPELL_PERIODIC_DAMAGE => 1,
    DAMAGE_SHIELD => 1,
);

foreach (<>) {
    %data = $parser->parse($_);

    # Don't include the paladin
    if ($data{action} eq "SPELL_CAST_SUCCESS" &&
        (
            $data{extra}->{spellname} eq "Sanctity Aura" ||
            $data{extra}->{spellname} eq "Judgement of the Crusader"
        )
       ) {
        $exclude{$data{actor_name}} = 1;
        $crusade{$data{actor_name}} = 0;
        print "Flagging $data{actor_name} as a retribution paladin via $data{extra}->{spellname}\n" if $debug;
    }

    # Track Sanctity Aura
    if ($data{action} eq "SPELL_AURA_APPLIED" && 
        $data{extra}->{spellname} eq "Sanctity Aura" &&
        $exclude{$data{target_name}} != 1
       ) {
            $aura{$data{target_name}} = 1;
            print "$data{target_name} gained Sanctity Aura\n" if $debug;
    }
    if ($data{action} eq "SPELL_AURA_REMOVED" &&
        $data{extra}->{spellname} eq "Sanctity Aura"
       ) {
            $aura{$data{target_name}} = 0;
            print "$data{target_name} lost Sanctity Aura\n" if $debug;
    }

    # Track Seal of the Crusader
    if ($data{action} eq "SPELL_AURA_APPLIED" && 
        $data{extra}->{spellname} eq "Judgement of the Crusader" &&
        $exclude{$data{target_name}} != 1
       ) {
            $crusade{$data{target}} = 1;
            print "$data{target_name} gained Judgement of the Crusader\n" if $debug;
    }
    if ($data{action} eq "SPELL_AURA_REMOVED" && 
        $data{extra}->{spellname} eq "Judgement of the Crusader" 
       ) {
            $crusade{$data{target}} = 0;
            print "$data{target_name} lost Judgement of the Crusader\n" if $debug;
    }

    # Track damage
    if ($damage_actions{$data{action}} &&
        $aura{$data{actor_name}} 
       ) {
            $sanct_damage += $data{extra}->{amount};
            print "$data{actor_name} did $data{extra}->{amount} damage\n" if $debug;
    }
    if ($damage_actions{$data{action}} &&
        $crusade{$data{target}} 
       ) {
            $crusade_damage += $data{extra}->{amount};
            print "$data{extra}->{amount} damage to $data{target_name} by $data{actor_name}\n" if $debug;
    }
}

print "Raw damage w/Sanctity Aura: ", comma($sanct_damage), "\n";
print "Estimated damage w/out Sanctity Aura: ", comma(int $sanct_damage / 1.02), "\n";

print "Raw damage w/JoC: ", comma($crusade_damage), "\n";
print "Estimated damage w/out JoC: ", comma(int $crusade_damage / 1.03), "\n";

print "Bonus damage: ", comma(($sanct_damage - int $sanct_damage / 1.02) + 
                        ($crusade_damage - int $crusade_damage / 1.03)), "\n";

sub comma {
    $comma = shift;
    $comma =~  s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
    return $comma;
}
Posted in Code
Comments 2 Email Blog Entry
Total Comments 2

Comments

Old
Another variable is for healing and mana regen- if there are paladins available to judge light and wisdom at the beginning of the fight, a ret paladin will be able to keep them refreshed and provide a shadow priest like effect.
Posted 06/20/08 at 4:24 PM by Har Har is offline
Old
Abbi's Avatar
Yeah; there's also an extra blessing. I'm not saying this is all you get out of a ret paladin. It's just a rough cut at the bonus damage.
Posted 07/08/08 at 11:36 AM by Abbi Abbi is offline