Changeset 987

Show
Ignore:
Timestamp:
08/05/08 14:26:44 (5 months ago)
Author:
takkaria
Message:
  • Remove a pointless variable
  • Make all torches always start with FUEL_TORCH fuel, as intended
  • Add birth_money option, which gives starting money instead of equipment
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/birth.c

    r975 r987  
    449449 
    450450        /* Minimum 200 gold */ 
    451         if (gold < 200) gold = 200; 
     451        if (OPT(birth_money)) gold = MAX(500, gold); 
     452        else gold = MAX(200, gold); 
    452453 
    453454        /* Save the gold */ 
     
    672673        object_prep(i_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH)); 
    673674        i_ptr->number = (byte)rand_range(3, 7); 
    674         i_ptr->timeout = FUEL_TORCH / 2
     675        i_ptr->timeout = FUEL_TORCH
    675676        i_ptr->origin = ORIGIN_BIRTH; 
    676677        object_aware(i_ptr); 
     
    757758         
    758759        /* Gold is inversely proportional to cost */ 
    759         p_ptr->au = p_ptr->au_birth = (50 * points_left) + 200; 
     760        p_ptr->au = OPT(birth_money) ? 500 : 200; 
     761        p_ptr->au += (50 * points_left); 
     762        p_ptr->au_birth = p_ptr->au; 
    760763 
    761764        /* Update bonuses, hp, etc. */ 
     
    16671670 
    16681671        /* Hack -- outfit the player */ 
    1669         player_outfit(); 
     1672        if (!OPT(birth_money)) player_outfit(); 
    16701673 
    16711674        /* Initialise the stores */ 
  • trunk/src/obj-info.c

    r980 r987  
    362362        { 
    363363                int blows = calc_blows(o_ptr); 
    364                 int extra_blows = 0; 
    365  
    366                 if (f1 & (TR1_BLOWS)) extra_blows += o_ptr->pval; 
    367                 blows += extra_blows; 
     364 
     365                if (f1 & (TR1_BLOWS)) blows += o_ptr->pval; 
    368366 
    369367                dam = ((o_ptr->ds + 1) * o_ptr->dd * 5); 
  • trunk/src/option.c

    r918 r987  
    4141                OPT_NONE, 
    4242                OPT_NONE, 
     43                OPT_NONE, 
    4344        }, 
    4445 
     
    6061                OPT_NONE, 
    6162                OPT_NONE, 
     63                OPT_NONE, 
    6264        }, 
    6365 
     
    7981                OPT_NONE, 
    8082                OPT_NONE, 
     83                OPT_NONE, 
    8184        }, 
    8285 
     
    8588                OPT_birth_maximize, 
    8689                OPT_birth_randarts, 
     90                OPT_birth_money, 
    8791                OPT_birth_ai_sound, 
    8892                OPT_birth_ai_smell, 
     
    108112                OPT_cheat_know, 
    109113                OPT_cheat_live, 
     114                OPT_NONE, 
    110115                OPT_NONE, 
    111116                OPT_NONE, 
     
    260265{ "birth_maximize",      "Maximize effect of race/class bonuses",       TRUE },  /* 128 */ 
    261266{ "birth_randarts",      "Randomize some of the artifacts (alpha)",     FALSE }, /* 129 */ 
    262 { NULL,                  NULL,                                          FALSE }, /* 130 */ 
     267{ "birth_money",         "Start with more money instead of equipment",  FALSE }, /* 130 */ 
    263268{ "birth_ironman",       "Restrict the use of stairs/recall",           FALSE }, /* 131 */ 
    264269{ "birth_no_stores",     "Restrict the use of stores/home",             FALSE }, /* 132 */ 
  • trunk/src/option.h

    r918 r987  
    1616 */ 
    1717#define OPT_PAGE_MAX                            5 
    18 #define OPT_PAGE_PER                            15 
     18#define OPT_PAGE_PER                            16 
    1919 
    2020/* The option data structures */ 
     
    8686#define OPT_birth_maximize          (OPT_BIRTH+0) 
    8787#define OPT_birth_randarts          (OPT_BIRTH+1) 
     88#define OPT_birth_money             (OPT_BIRTH+2) 
    8889#define OPT_birth_ironman           (OPT_BIRTH+3) 
    8990#define OPT_birth_no_stores         (OPT_BIRTH+4) 
     
    110111#define OPT_adult_maximize          (OPT_ADULT+0) 
    111112#define OPT_adult_randarts          (OPT_ADULT+1) 
     113#define OPT_adult_money             (OPT_ADULT+2) 
    112114#define OPT_adult_ironman           (OPT_ADULT+3) 
    113115#define OPT_adult_no_stores         (OPT_ADULT+4) 
  • trunk/src/store.c

    r946 r987  
    12621262                if (i_ptr->tval == TV_LITE) 
    12631263                { 
    1264                         if (i_ptr->sval == SV_LITE_TORCH) i_ptr->timeout = FUEL_TORCH; 
    1265                         if (i_ptr->sval == SV_LITE_LANTERN) i_ptr->timeout = FUEL_LAMP / 2; 
     1264                        if (i_ptr->sval == SV_LITE_TORCH) 
     1265                                i_ptr->timeout = FUEL_TORCH; 
     1266                        if (i_ptr->sval == SV_LITE_LANTERN) 
     1267                                i_ptr->timeout = FUEL_LAMP / 2; 
    12661268                } 
    12671269 
     
    13411343        if (object.tval == TV_LITE) 
    13421344        { 
    1343                 if (object.sval == SV_LITE_TORCH)        object.timeout = FUEL_TORCH / 2; 
    1344                 else if (object.sval == SV_LITE_LANTERN) object.timeout = FUEL_LAMP / 2; 
     1345                if (object.sval == SV_LITE_TORCH) 
     1346                        object.timeout = FUEL_TORCH; 
     1347                else if (object.sval == SV_LITE_LANTERN) 
     1348                        object.timeout = FUEL_LAMP / 2; 
    13451349        } 
    13461350