Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
poschengband committed Jan 1, 2015
2 parents 31d71fa + cf8fc58 commit 68591f5
Show file tree
Hide file tree
Showing 29 changed files with 275 additions and 181 deletions.
4 changes: 2 additions & 2 deletions lib/edit/a_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ I:45:0:4
W:70:90:2:35000
F:STR | DEX | CON | HIDE_TYPE | SPEED |
D:The treasure of Tulkas, most fleet and wrathful of the Valar.
E:SPEED:25:225:75
E:SPEED_HERO:25:225:75
E:The ring glows brightly...

# The Ring of Power (Narya)
Expand Down Expand Up @@ -470,7 +470,7 @@ N:38:of Hammerhand
I:32:6:3
W:20:2:60:45000
P:6:1d3:3:4:20
F:STR | DEX | CON | HIDE_TYPE | RES_ACID | RES_NEXUS | DEC_STEALTH
F:STR | DEX | CON | HIDE_TYPE | RES_ACID | RES_NEXUS | DEC_STEALTH | SHOW_MODS
D:A great helm as steady as the heroes of the Westdike. Mighty were the
D:blows of Helm, the Hammerhand!

Expand Down
1 change: 0 additions & 1 deletion lib/edit/e_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ N:5:GLOVES:of the Wizard
W:20:*:4
C:-10:-10:-20:5
F:INT | MAGIC_MASTERY | HIDE_TYPE
F:DEC_STR

N:6:GLOVES:of the Yeek
W:0:50:4
Expand Down
12 changes: 6 additions & 6 deletions lib/edit/k_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2752,21 +2752,21 @@ P:0:1d1:0:0:0

N:357:Lightning Bolts:Molybdenum
G:-:W
I:66:21:5
I:66:21:11
W:20:0:40:15:2000
A:10/4:20/1
P:0:1d1:0:0:0

N:358:Frost Bolts:Nickel
G:-:U
I:66:23:5
I:66:23:13
W:20:0:40:15:2500
A:13/4:20/1
P:0:1d1:0:0:0

N:359:Fire Bolts:Rusty
G:-:r
I:66:22:5
I:66:22:15
W:20:0:40:15:3000
A:15/4:20/1
P:0:1d1:0:0:0
Expand Down Expand Up @@ -2794,7 +2794,7 @@ P:0:1d1:0:0:0

N:363:Drain Life:Titanium
G:-:w
I:66:18:13
I:66:18:23
W:55:0:0:15:3600
A:38/16:55/4
P:0:1d1:0:0:0
Expand Down Expand Up @@ -4986,14 +4986,14 @@ P:0:1d1:0:0:0
N:744:Mana Balls:Jade
G:-:B
I:66:33:35
W:80:0:0:15:15000
W:80:0:0:15:25000
A:50/16:80/4
P:0:1d1:0:0:0

N:745:Mana Bolts:Crystal
G:-:B
I:66:34:35
W:55:0:0:15:10000
W:55:0:0:15:15000
A:40/16:55/4
P:0:1d1:0:0:0

Expand Down
8 changes: 5 additions & 3 deletions lib/edit/r_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8997,7 +8997,7 @@ F:MALE |
F:DROP_1D2 | FRIENDS | INVISIBLE |
F:OPEN_DOOR | BASH_DOOR | HURT_LITE |
F:EVIL | RES_DARK | NO_CONF | NO_SLEEP
F:DROP_SKELETON | DROP_CORPSE | POS_SEE_INVIS
F:DROP_SKELETON | DROP_CORPSE | POS_SEE_INVIS | POS_BACKSTAB
P:Copy:Dark-Elf:Ninja
P:Speed:+7
D:A dark elven assassin, so stealthy that he is almost impossible to see.
Expand Down Expand Up @@ -17957,7 +17957,7 @@ P:Speed:+5

N:1003:The Ghost 'Q'
G:G:w
I:140:10d20:10:30:10:10
I:140:10d20:20:30:10:10
W:15:3:999:150:0:0
B:TOUCH:EAT_FOOD:1d1
B:TOUCH:EAT_FOOD:1d1
Expand Down Expand Up @@ -20254,9 +20254,11 @@ D: to seek and dominate the bodies of others. It looks like a small
D: cloud of glowing white mist. In this form it is harmless, but
D: upon possessing the dead body of another creature it will be able
D: to use all its powers.
P:Copy:Snotling:Tourist
F:POS_TELEPATHY
P:Copy:Yeek:Tourist
P:Life:70
P:Infra:5
P:Skills:0:0:0:7:0:0:0:0
P:Body:Possessor Soul

N:1130:Marilith
Expand Down
4 changes: 2 additions & 2 deletions lib/edit/t0000001.txt
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,10 @@ F:@:FLOOR:3:0:0:0:174

##########################################################################
# Mauler
# Impaler
# Aegir
?:[AND [EQU $QUEST27 3] [EQU $CLASS Mauler] [EQU [MOD $RANDOM27 5] 0] ]
F:a:BUILDING_0:3
F:@:FLOOR:3:0:0:0:324
F:@:FLOOR:3:0:0:0:251

# Benkei
?:[AND [EQU $QUEST27 3] [EQU $CLASS Mauler] [GEQ [MOD $RANDOM27 5] 1] ]
Expand Down
2 changes: 1 addition & 1 deletion lib/file/news.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
****************************************
** PosChengband 3.4.1 **
** PosChengband 3.4.2 **
****************************************

Based on Moria: Copyright (c) 1985 Robert Alan Koeneke
Expand Down
3 changes: 2 additions & 1 deletion lib/pref/pickpref.prf
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ rod of healing#@zh
?wand of rockets#@ar!s!d!k
?wand of disintegrate#@ad!s!d!k

?:[EQU $CLASS Mage High-Mage]
?:[OR [EQU $CLASS Mage High-Mage] [EQU $RACE Beholder Lich] ]
rod of cold balls#!s!d!k
rod of fire balls#!s!d!k
rod of lightning balls#!s!d!k
rod of acid balls#!s!d!k
rod of mana balls#!s!d!k
wizardstaff

?:[EQU $CLASS Magic-Eater]
Expand Down
61 changes: 34 additions & 27 deletions src/cmd1.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,12 @@ critical_t critical_norm(int weight, int plus, s16b meichuu, int mode, int hand)
/* Extract "blow" power */
i = (weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3));

/* Mauler: Destroyer now scales with level, and grants better quality */
/* Mauler: Destroyer now scales with level */
if ( p_ptr->pclass == CLASS_MAULER
&& equip_is_valid_hand(hand)
&& p_ptr->weapon_info[hand].wield_how == WIELD_TWO_HANDS )
{
int pct = MIN((weight - 200)/10, 40);
int pct = MIN((weight - 200)/20, 20);
if (pct > 0)
pct = pct * p_ptr->lev / 50;
i += roll * pct / 100;
Expand All @@ -530,9 +530,7 @@ critical_t critical_norm(int weight, int plus, s16b meichuu, int mode, int hand)
}
if (mode == MAULER_CRITICAL_BLOW)
{
k += randint1(650*p_ptr->lev/50);
if (k < 400)
k = 400;
k += randint1(250*p_ptr->lev/50);
}

if (k < 400)
Expand Down Expand Up @@ -2456,27 +2454,14 @@ static void innate_attacks(s16b m_idx, bool *fear, bool *mdeath, int mode)
{
case GF_MISSILE:
*mdeath = mon_take_hit(m_idx, dam, fear, NULL);
if (!(*mdeath) && (p_ptr->special_attack & ATTACK_CONFUSE))
{
p_ptr->special_attack &= ~(ATTACK_CONFUSE);
msg_format("Your %s stops glowing.", a->name);
p_ptr->redraw |= (PR_STATUS);
if (r_ptr->flags3 & RF3_NO_CONF)
{
if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_NO_CONF;
msg_format("%^s is unaffected.", m_name);
}
else if (randint0(100) < r_ptr->level)
msg_format("%^s is unaffected.", m_name);
else
{
msg_format("%^s appears confused.", m_name);
(void)set_monster_confused(m_idx, MON_CONFUSED(m_ptr) + 10 + randint0(p_ptr->lev) / 5);
}
}
break;
case GF_DISENCHANT:
*mdeath = mon_take_hit(m_idx, dam, fear, NULL);
if (!(*mdeath) && one_in_(7))
dispel_monster_status(m_idx);
break;
case GF_OLD_SLEEP:
delay_sleep += effect_pow;
delay_sleep += effect_pow/2;
break;
case GF_STASIS:
delay_stasis += effect_pow;
Expand Down Expand Up @@ -2542,6 +2527,8 @@ static void innate_attacks(s16b m_idx, bool *fear, bool *mdeath, int mode)

if (*mdeath) return;

on_p_hit_m(m_idx);

if (mode == DRAGON_SNATCH)
{
msg_format("You grab %s in your jaws.", m_name);
Expand Down Expand Up @@ -2672,7 +2659,7 @@ static void do_monster_knockback(int x, int y, int dist)

static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int mode)
{
int num = 0, k, k2, bonus, chance;
int num = 0, k, k2, dam_tot = 0, bonus, chance;
int to_h = 0, to_d = 0;
int touch_ct = 0;
critical_t crit;
Expand Down Expand Up @@ -2805,6 +2792,14 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
backstab = TRUE;
}
break;

case CLASS_MONSTER:
if (p_ptr->ambush && o_ptr)
{
if (MON_CSLEEP(m_ptr) && m_ptr->ml)
backstab = TRUE;
}
break;
}

if (o_ptr)
Expand All @@ -2831,6 +2826,7 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
bonus = p_ptr->weapon_info[hand].to_h + to_h;
if (mode == WEAPONMASTER_KNOCK_BACK) bonus -= 20;
if (mode == WEAPONMASTER_REAPING) bonus -= 40;
if (mode == MAULER_KNOCKOUT_BLOW) bonus -= 50;
if (mode == WEAPONMASTER_CUNNING_STRIKE) bonus += 20;
if (mode == WEAPONMASTER_SMITE_EVIL && hand == 0 && (r_ptr->flags3 & RF3_EVIL)) bonus += 200;

Expand Down Expand Up @@ -3123,7 +3119,7 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int

if (mode == MAULER_CRUSHING_BLOW)
{ /* 2x to 5x */
k = k * (5 + randint1(p_ptr->lev/5)) / 3;
k = k * (5 + randint1(p_ptr->lev/5)) / 3;
}

if ( (have_flag(flgs, TR_IMPACT) && (k > 50 || one_in_(7)))
Expand Down Expand Up @@ -3175,6 +3171,8 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
}
}

k += k * p_ptr->weapon_info[hand].to_mult / 100;

drain_result = k;
k2 = k;

Expand Down Expand Up @@ -3504,6 +3502,8 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
if (mode == WEAPONMASTER_CRUSADERS_STRIKE)
k = k * 3 / 2;

dam_tot += k;

if (mode == WEAPONMASTER_REAPING)
{
int start_dir, x2, y2;
Expand Down Expand Up @@ -3647,7 +3647,7 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
else
{
msg_format("%^s is knocked out.", m_name);
knock_out++;
set_monster_paralyzed(c_ptr->m_idx, randint1(3));
/* No more retaliation this round! */
retaliation_count = 100; /* Any number >= 4 will do ... */
}
Expand Down Expand Up @@ -4131,6 +4131,13 @@ static bool py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
if (do_quake)
earthquake(py, px, 10);


#if 1
if (p_ptr->pclass == CLASS_MAULER)
c_put_str(TERM_WHITE, format("Maul:%5d", dam_tot), 24, 0);
#endif


return success_hit;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@ void do_cmd_rest(void)
}

if (clear)
mimic_race(MIMIC_NONE);
mimic_race(MIMIC_NONE, "You cannot rest while maintaining your current form.");
}

if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
Expand Down
30 changes: 22 additions & 8 deletions src/combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static _blow_info_t _get_blow_info(int hand)
break;

case CLASS_MAULER:
result.num = 300; result.wgt = 280; result.mul = 75; break;
result.num = 150; result.wgt = 280; result.mul = 75; break;

case CLASS_BERSERKER:
result.num = 600; result.wgt = 70; result.mul = 75; break;
Expand Down Expand Up @@ -369,7 +369,7 @@ int calculate_base_blows(int hand, int str_idx, int dex_idx)
result = rng.min + (rng.max - rng.min) * blow_str_idx / 110;

if (p_ptr->pclass == CLASS_MAULER)
result = 100 + (result - 100)/2;
result = 100 + (result - 100)/8;

if (result > blow_info.num)
result = blow_info.num;
Expand Down Expand Up @@ -460,6 +460,7 @@ int display_weapon_info(int hand, int row, int col)
int to_h = 0;
int mult;
critical_t crit = {0};
int crit_pct = 0;
int num_blow = NUM_BLOWS(hand);
int r,c;
bool force = FALSE;
Expand Down Expand Up @@ -502,24 +503,29 @@ int display_weapon_info(int hand, int row, int col)
else if (have_flag(flgs, TR_VORPAL))
mult = mult * 11 / 9;

mult += mult * p_ptr->weapon_info[hand].to_mult / 100;

if (!have_flag(flgs, TR_ORDER))
{
const int ct = 10 * 1000;
const int attempts = 10 * 1000;
int i;
int crits = 0;
/* Compute Average Effects of Criticals by sampling */
for (i = 0; i < ct; i++)
for (i = 0; i < attempts; i++)
{
critical_t tmp = critical_norm(o_ptr->weight, to_h, p_ptr->weapon_info[hand].to_h, 0, hand);
if (tmp.desc)
{
crit.mul += tmp.mul;
crit.to_d += tmp.to_d;
crits++;
}
else
crit.mul += 100;
}
crit.mul = crit.mul / ct;
crit.to_d = crit.to_d * 100 / ct;
crit.mul = crit.mul / attempts;
crit.to_d = crit.to_d * 100 / attempts;
crit_pct = crits * 1000 / attempts;
}
else
crit.mul = 100;
Expand Down Expand Up @@ -568,11 +574,19 @@ int display_weapon_info(int hand, int row, int col)
}
else
{
sprintf(buf, " %-7.7s: %d.%02dx", "Crits",
crit.mul/100, crit.mul%100);
sprintf(buf, " %-7.7s: %d.%02dx (%d.%d%%)", "Crits",
crit.mul/100, crit.mul%100, crit_pct / 10, crit_pct % 10);
}
put_str(buf, r++, c);
}
if (p_ptr->weapon_info[hand].to_mult)
{
int m = 100 + p_ptr->weapon_info[hand].to_mult;
sprintf(buf, " %-7.7s: %d.%02dx", "Mauler",
m / 100, m % 100);
put_str(buf, r++, c);
}


_display_weapon_slay(mult, 100, FALSE, num_blow, dd, ds, to_d, "Normal", TERM_WHITE, r++, c);
if (force)
Expand Down
Loading

0 comments on commit 68591f5

Please sign in to comment.