Changeset 5 for src

Show
Ignore:
Timestamp:
06/30/08 21:19:58 (17 years ago)
Author:
jinshiro
Message:
 
Location:
src/map
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • src/map/atcommand.c

    r1 r5  
    12691269                        { "gunner",     24 }, 
    12701270                        { "ninja",      25 }, 
     1271                        //Begin custom Job (blackmagic) 
     1272                        { "adept",      30 },//New job classes [Brainstorm] 
     1273                        { "necromancer",        31 }, 
     1274                        { "necro",      31 }, 
     1275                        { "warlock",    32 }, 
     1276                        //End Custom Job 
    12711277                        { "high novice",        4001 }, 
    12721278                        { "swordsman high",     4002 }, 
     
    78167822        return 0; 
    78177823} 
    7818  
     7824//Begin Custom Jobs (black magic) 
     7825//@showsummon [Brainstorm] 
     7826int atcommand_showsummon(const int fd, struct map_session_data* sd, const char* command, const char* message) 
     7827{ 
     7828        if (sd->state.showsummon) { 
     7829        sd->state.showsummon = 0; 
     7830        clif_displaymessage(fd, "Summon Stats will not be shown."); 
     7831        return 0; 
     7832        } 
     7833 
     7834        sd->state.showsummon = 1; 
     7835        clif_displaymessage(fd, "Summon Stats is now shown."); 
     7836        return 0; 
     7837} 
     7838//End Custom Jobs 
    78197839/*========================================== 
    78207840 * Barricade Build 
     
    86238643        { "barricade",         60,     atcommand_barricade }, 
    86248644        { "killbarricade",     60,     atcommand_barricade_destroy }, 
     8645        //Bwgin Custom Jobs (blackmagic) 
     8646        //Vanaheim Commands 
     8647        { "showsummon",  0, atcommand_showsummon}, //Brainstorm 
     8648        //End Custom Jobs 
    86258649        { "god",                                60,             atcommand_god }, 
    86268650        { "demon",                              60,             atcommand_demon }, 
  • src/map/battle.c

    r1 r5  
    373373                } 
    374374 
     375                //Begin Custom Jobs (blackmagic) 
     376                         
     377        //Display red flashing aura effect of Adept Blood Lust [Brain] 
     378        if(sc->data[SC_LUST] && damage > 0){ 
     379                clif_specialeffect(bl, 548, AREA); 
     380                if(rand()%100 < 10) clif_specialeffect(bl, 455, AREA); //Red Lightnings, 1/10 attacks will show to prevent spam 
     381        }; 
     382        //Display blue flashing aura effect of Warlock Overwhelming Evil [Brain] 
     383        if(sc->data[SC_OVERWHELMING] && damage > 0) 
     384                clif_specialeffect(bl, 73, AREA); 
     385 
     386        // AT-Field [Brainstorm] 
     387        if(sc->data[SC_ATFIELD] && 
     388                rand()%100 < sc->data[SC_ATFIELD]->val2) 
     389        {       //Blocks all skills. 
     390                clif_specialeffect(bl, 438, AREA); 
     391                //Shouldn't end until Breaker's non-weapon part connects. 
     392                if (skill_num == ASC_BREAKER || 
     393                skill_num == LK_SPIRALPIERCE || 
     394                skill_num == CG_ARROWVULCAN || 
     395                skill_num == SN_SHARPSHOOTING) 
     396                if (--sc->data[SC_ATFIELD]->val3 <= 0) //We make it work like Safety Wall 
     397                status_change_end(bl, SC_ATFIELD, -1); 
     398                return 0; 
     399        } 
     400//End Custom Jobs 
     401 
    375402                if (((sce=sc->data[SC_UTSUSEMI]) || sc->data[SC_BUNSINJYUTSU]) 
    376403                &&  
     
    624651                        damage += sd->status.str; 
    625652        } 
     653        //Begin Custom Jobs (blackmagic)         
     654        //Warlock Touch of Corruption (Mage-Monster Killer passive skill) [Brainstorm] 
     655        if((skill = pc_checkskill(sd,WL_CORRUPTION)) > 0 && target->type==BL_MOB ) 
     656        damage += (skill * (status->int_/10)); 
     657        //end custom job 
    626658 
    627659        if(type == 0) 
     
    12991331                        switch( skill_num ) 
    13001332                        { 
     1333                        //Begin Custom Job (blackmagic) 
     1334                                case NC_DEATHHAND: // Necro Death Hand [Brain] 
     1335                                skillratio += -25+25*skill_lv; 
     1336                                break; 
     1337                        //End Black Magic Custom Jobs 
    13011338                                case SM_BASH: 
    13021339                                        skillratio += 30*skill_lv; 
     
    15751612                                        skillratio += 100 *(skill_lv-1); 
    15761613                                        break; 
     1614                                        //Begin Custom Jobs (blackmagic) 
     1615                                        //Mercenary Skills [Brainstorm] 
     1616                                case MS_BASH: 
     1617                                        skillratio += 30*skill_lv; 
     1618                                        break; 
     1619                                case MER_CRASH: 
     1620                                        skillratio += 10*skill_lv; 
     1621                                        break; 
     1622                                        //end custom jobs 
    15771623                        } 
    15781624 
     
    21882234                        case AL_HEAL: 
    21892235                        case PR_BENEDICTIO: 
     2236                                //Begin Custom Job (blackmagic) 
     2237                        case AD_DARKHEAL: // Adept Dark Heal 
     2238                                //end custom job 
    21902239                                ad.damage = skill_calc_heal(src, target, skill_lv)/2; 
    21912240                                break; 
     
    23062355                                                skillratio += 100 +100*skill_lv +100*(skill_lv/2); 
    23072356                                                break; 
    2308                                 } 
     2357                                //Begin Custom Job (blackmagic) 
     2358                                        case NC_DRAINLIFE: // Necro Drain Life [Brain] 
     2359                                                skillratio += 25*skill_lv; 
     2360                                                break; 
     2361                                        case WL_HELLFIRE: // Warlock Hellfire [Brain] 
     2362                                                skillratio += 25*skill_lv; 
     2363                                                break; 
     2364                                        case WL_SHADOWBURN: // Warlock Shadow Burn [Brain] 
     2365                                                skillratio += 20*skill_lv; 
     2366                                                break; 
     2367                                        case WL_CURSEDOOM: // Warlock Curse of Doom [Brain] 
     2368                                                skillratio += 400 + 300*skill_lv; //max 20*matk dmg after 60 seconds 
     2369                                                break; 
     2370                                        case WL_SEARING: // Warlock Searing Pain [Brain] 
     2371                                                if(status_get_sc(target)->data[SC_SEARING]) 
     2372                                                        skillratio = 10*pc_checkskill(sd,WL_SEARING);//10% * skilllv 
     2373                                                break; //Else 100% Matk 
     2374                                        case WL_IMMOLATE: // Warlock Immolate [Brain] 
     2375                                                if(status_get_sc(target)->data[SC_IMMOLATE]) 
     2376                                                        skillratio += 10*pc_checkskill(sd,WL_SEARING);//100% +10 * searing lv 
     2377                                                else skillratio += -20 + 20*skill_lv;// Else 80% + 20% * skill lv 
     2378                                                break; 
     2379                                        case WL_CONFLAGRATE: // Warlock Conflagrate [Brain] 
     2380                                                skillratio += 100 + 60*skill_lv + //damage bonus from other fire skills 
     2381                                                        10*pc_checkskill(sd,WL_SEARING) + 10*pc_checkskill(sd,WL_IMMOLATE); 
     2382                                                break; 
     2383        //End Custom Job 
     2384                        } 
    23092385 
    23102386                                MATK_RATE(skillratio); 
     
    23762452                if (!(nk&NK_NO_ELEFIX)) 
    23772453                        ad.damage=battle_attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv); 
    2378  
     2454        //Begin Custom Job (blackmagic)          
     2455        if(skill_num == WL_SHADOWBURN) { // Warlock Shadow Burn [Brain] 
     2456                // This is where we calculate the secondary damage 
     2457                if(ad.damage<1) ad.damage=1; 
     2458                struct Damage md = battle_calc_misc_attack(src,target,skill_num,skill_lv, mflag); 
     2459                if(md.damage<1) md.damage=1; 
     2460                ad.damage += md.damage; 
     2461        } 
     2462        //End Custom Job 
    23792463                if (sd && !(nk&NK_NO_CARDFIX_ATK)) { 
    23802464                        short t_class = status_get_class(target); 
     
    25762660        case NPC_EVILLAND: 
    25772661                md.damage = (skill_lv>6)?666:skill_lv*100; 
     2662        //Begin Custom Job (blackmagic) 
     2663        case WL_SHADOWBURN: // Warlock ShadowBurn dark element damage [Brain] 
     2664        s_ele = ELE_DARK; 
     2665        md.damage = ((300 + 20*skill_lv)/100)*((sstatus->int_*(rand()%300+500))/100); //Fixed between min and max matk for now 
     2666        //End Custom Job 
    25782667                break; 
    25792668        } 
     
    27632852        if (sd->sp_vanish_rate && rand()%1000 < sd->sp_vanish_rate) 
    27642853                status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->sp_vanish_per, false); 
     2854        //begin custom job (blackmagic   
     2855        // Adept Blood Pact drains 5% damage per hit [FlavioJS/Brain] 
     2856        if( pc_checkskill(sd, AD_BLOODPACT) > 0 ) 
     2857        thp += battle_calc_drain(rdamage,1000,5); 
     2858 
     2859        // Warlock Soul Steal drains 1%*skilllv damage per hit [Brain] 
     2860        if( pc_checkskill(sd, WL_SOULSTEAL) > 0 ) 
     2861        tsp += battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_SOULSTEAL)); 
     2862        // Warlock Touch of Corruption burns 1%*skilllv damage as SP per hit [Brain] 
     2863        if( pc_checkskill(sd, WL_CORRUPTION) > 0 ) { 
     2864        int corrupt_sp; 
     2865        corrupt_sp = battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_CORRUPTION)); 
     2866        if(status_damage(NULL, tbl, 0, corrupt_sp, 0, 3)) 
     2867                rhp += corrupt_sp;//If SP damage was caused, increase HP damage too 
     2868        } 
     2869        //end custom job 
    27652870        if (!thp && !tsp) return; 
    27662871 
     
    29863091        return wd.dmg_lv; 
    29873092} 
     3093 
     3094//Begin custom Job (blackmagic) 
     3095int battle_check_living(int race,int element)// Living creature check [Brain] 
     3096{ 
     3097        if(element == ELE_UNDEAD || race == RC_UNDEAD // Undead element and race check 
     3098        || race == RC_DEMON             // Demon race check 
     3099        || race == RC_FORMLESS          // Formless race check 
     3100        || element == ELE_GHOST){       // Ghost element check 
     3101        return 0; 
     3102        } 
     3103        else { 
     3104        return 1; 
     3105        } 
     3106} 
     3107//end custom job 
    29883108 
    29893109int battle_check_undead(int race,int element) 
     
    37123832        { "auction_feeperhour",                 &battle_config.auction_feeperhour,              12000,  0,      INT_MAX,        }, 
    37133833        { "auction_maximumprice",               &battle_config.auction_maximumprice,            500000000, 0,   MAX_ZENY,       }, 
     3834        //Begin Custom Job (blackmagic)  
     3835        //Vanaheim battle settings [Brainstorm] 
     3836        { "necro_retaliation",            &battle_config.necro_retaliation,                1,     0,      1,              }, 
     3837        { "disp_summon_stats",            &battle_config.disp_summon_stats, 
     3838        //End Custom Job 
    37143839        { "gm_viewequip_min_lv",                &battle_config.gm_viewequip_min_lv,             0,      0,      99,             }, 
    37153840}; 
  • src/map/battle.h

    r1 r5  
    8888 
    8989int battle_check_undead(int race,int element); 
     90//Begin Custom Job (blackmagic) 
     91int battle_check_living(int race,int element);  //Living Creature Check [Brain] 
     92//End Custom Job (blackmagic) 
    9093int battle_check_target(struct block_list *src, struct block_list *target,int flag); 
    9194bool battle_check_range(struct block_list *src,struct block_list *bl,int range); 
     
    452455        int auction_feeperhour; 
    453456        int auction_maximumprice; 
     457        //Begin custom Job (blackmagic)  
     458        //Vanaheim battle settings [Brainstorm] 
     459        int necro_retaliation; //Battle flag to force monsters to attack adept/necro/warlock summons [Brain] 
     460        int disp_summon_stats; //Battle Flag to show summoned monster stats [Brain] 
     461        //end custom job 
    454462        int gm_viewequip_min_lv; 
    455463} battle_config; 
  • src/map/itemdb.c

    r1 r5  
    242242        if (jobmask & 1<<JOB_NINJA) 
    243243                bclass[0] |= 1<<MAPID_NINJA; 
     244        //Begin custom job (blackmagic) 
     245        if (jobmask & 1<<26) // Adept [Brain] 
     246        bclass[0] |= 1<<MAPID_ADEPT; 
     247        if (jobmask & 1<<27) // Necromancer [Brain] 
     248        bclass[1] |= 1<<MAPID_ADEPT; 
     249        if (jobmask & 1<<28) // Warlock [Brain] 
     250        bclass[2] |= 1<<MAPID_ADEPT; 
     251        //end custom job 
    244252} 
    245253 
  • src/map/map.h

    r1 r5  
    7777        MAPID_XMAS, 
    7878        MAPID_SUMMER, 
     79        //Begin custom Jobs (blackmagic) 
     80        MAPID_ADEPT = 0x0E,     // Adept [Brain] 
     81        //end 
    7982//2_1 classes 
    8083        MAPID_SUPER_NOVICE = JOBL_2_1|0x0, 
     
    8689        MAPID_ASSASSIN, 
    8790        MAPID_STAR_GLADIATOR, 
     91        //Begin Custom Jobs (blackmagic) 
     92        MAPID_NECROMANCER = JOBL_2_1|0x0E,      // Necromancer [Brain] 
     93        //end 
    8894//2_2 classes 
    8995        MAPID_CRUSADER = JOBL_2_2|0x1, 
     
    94100        MAPID_ROGUE, 
    95101        MAPID_SOUL_LINKER, 
     102        //begin custom job (blackmagic) 
     103        MAPID_WARLOCK = JOBL_2_2|0x0E, // Warlock [Flavio] 
     104        //end 
    96105//1-1, advanced 
    97106        MAPID_NOVICE_HIGH = JOBL_UPPER|0x0, 
  • src/map/mob.c

    r1 r5  
    245245 * 1: poring list 
    246246 * 2: bloody branch list 
     247 * 3: mob_pouch list 
     248 * 4: familiar list // familiar by FlavioJS [Brain] 
    247249 * flag: 
    248250 * &1: Apply the summon success chance found in the list (otherwise get any monster from the db) 
     
    20112013                        break; 
    20122014                //Let players decide whether to retaliate versus the master or the mob. [Skotlex] 
    2013                 if (md2->master_id && battle_config.retaliate_to_master) 
    2014                         md->attacked_id = md2->master_id; 
     2015                /*if (md2->master_id && battle_config.retaliate_to_master) 
     2016                        md->attacked_id = md2->master_id;*/ 
     2017//UNCOMMENT IF ERROR OCCURS WITH CUSTOM JOBS V 
     2018//if (md2->master_id && battle_config.retaliate_to_master) 
     2019                //BEGIN Custom Jobs (blackmagic) 
     2020                        { 
     2021                //necro_retaliation config (same as above, but only works for adept/necro/warlock summons) [Brainstorm] 
     2022                if(!battle_config.necro_retaliation && (md2->class_ >= 3100 && md2->class_ <= 3235)) 
     2023                md->attacked_id = src->id; 
     2024                else md->attacked_id = md2->master_id; //All normal summons 
     2025        } 
     2026                        //end 
    20152027                else 
    20162028                        md->attacked_id = src->id; 
     
    28122824        return map_foreachinmap(mob_countslave_sub, bl->m, BL_MOB,bl->id); 
    28132825} 
     2826 
     2827//Begin Custom Jobs (blackmagic) 
     2828/// Count slaves with a certain master and class. by FlavioJS [Brain] 
     2829static int mob_countslave_class_sub(struct block_list* bl, va_list ap) 
     2830{ 
     2831        int id; 
     2832        int count; 
     2833        short* classes; 
     2834        TBL_MOB* md; 
     2835 
     2836        id = va_arg(ap, int); 
     2837        count = va_arg(ap, int); 
     2838        classes = va_arg(ap, short*); 
     2839        md = (TBL_MOB*)bl; 
     2840         
     2841        if( md->master_id == id ) 
     2842        {// has the correct master 
     2843        int i; 
     2844        for( i = 0; i < count; ++i ) 
     2845        { 
     2846                if( md->class_ == classes[i] ) 
     2847                return 1; 
     2848        } 
     2849        } 
     2850        return 0; 
     2851} 
     2852 
     2853/// Returns the number of slaves of the specified classes. by FlavioJS [Brain] 
     2854/// @param bl Master 
     2855/// @param count Number of classes 
     2856/// @param classes Array of classes 
     2857int mob_countslave_class(struct block_list* bl, int count, short* classes) 
     2858{ 
     2859        return map_foreachinmap(mob_countslave_class_sub, bl->m, BL_MOB, bl->id, count, classes); 
     2860} 
     2861 
     2862//End 
    28142863 
    28152864/*========================================== 
     
    39744023                "mob_poring.txt", 
    39754024                "mob_boss.txt", 
    3976                 "mob_pouch.txt"}; 
     4025                "mob_pouch.txt" 
     4026                //Begin custom Jobs (blackmagic 
     4027                "mob_familiar.txt" // familiar By FlavioJS [Brain] 
     4028        }; 
     4029        //end 
    39774030 
    39784031        memset(&summon, 0, sizeof(summon)); 
  • src/map/mob.h

    r1 r5  
    1212 
    1313 
    14 #define MAX_RANDOMMONSTER 4 
     14#define MAX_RANDOMMONSTER 5 
    1515#define MAX_MOB_RACE_DB 6 
    1616 
     
    1818// Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes. 
    1919// Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000 
    20 #define MAX_MOB_DB 3000 
     20#define MAX_MOB_DB 7000 
    2121 
    2222//The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from. 
     
    271271int mob_convertslave(struct mob_data *md); 
    272272 
     273//Begin custom Job (blackmagic) 
     274int mob_countslave_class(struct block_list* bl, int count, short* classes); // By FlavioJS [Brain] 
     275//end 
    273276int mob_is_clone(int class_); 
    274277