diff --git a/act.item.c b/act.item.c index 4ad59623..3345bb6e 100755 --- a/act.item.c +++ b/act.item.c @@ -2115,7 +2115,9 @@ static void perform_get_from_container(struct char_data *ch, struct obj_data *ob if (mode == FIND_OBJ_INV || can_take_obj(ch, obj)) { - if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch) && GET_OBJ_TYPE(obj) != ITEM_MONEY) + if (IS_CARRYING_N(ch) >= + CAN_CARRY_N(ch) && + GET_OBJ_TYPE(obj) != ITEM_MONEY) act("$p: you can't hold any more items.", FALSE, ch, obj, 0, TO_CHAR); else if (get_otrigger(obj, ch)) { diff --git a/class.c b/class.c index 1031365e..81c906ca 100755 --- a/class.c +++ b/class.c @@ -4154,6 +4154,7 @@ void load_class_list(void) /* 3rd circle */ spell_assignment(CLASS_WIZARD, SPELL_LIGHTNING_BOLT, 5); spell_assignment(CLASS_WIZARD, SPELL_FIREBALL, 5); + spell_assignment(CLASS_WIZARD, SPELL_FLAME_ARROW, 5); spell_assignment(CLASS_WIZARD, SPELL_WATER_BREATHE, 5); spell_assignment(CLASS_WIZARD, SPELL_SUMMON_CREATURE_3, 5); spell_assignment(CLASS_WIZARD, SPELL_PHANTOM_STEED, 5); @@ -5462,6 +5463,7 @@ void load_class_list(void) /* 3rd circle */ spell_assignment(CLASS_SORCERER, SPELL_LIGHTNING_BOLT, 6); spell_assignment(CLASS_SORCERER, SPELL_FIREBALL, 6); + spell_assignment(CLASS_SORCERER, SPELL_FLAME_ARROW, 6); spell_assignment(CLASS_SORCERER, SPELL_WATER_BREATHE, 6); spell_assignment(CLASS_SORCERER, SPELL_SUMMON_CREATURE_3, 6); spell_assignment(CLASS_SORCERER, SPELL_PHANTOM_STEED, 6); diff --git a/evolutions.c b/evolutions.c index 73f82510..4f2f7674 100644 --- a/evolutions.c +++ b/evolutions.c @@ -232,7 +232,7 @@ void assign_evolutions(void) "claw attacks. 1d6 if large, 1d8 if huge."); evolutiono(EVOLUTION_RIDER_BOND, "rider bond", 2, false, 1, false, EVOLUTION_MOUNT, 0, 0, 0, 0, 0, EVOLUTION_REQ_TYPE_ALL, "The eidolon offers a bonus to ride skill equal to 1/2 summoner level, and also provides the mounted " - "combat feat to the summoner whenm ridden by them."); + "combat feat to the summoner when ridden by them."); evolutiono(EVOLUTION_SHADOW_BLEND, "shadow blend", 2, false, 1, true, 0, 0, 0, 0, 0, 0, EVOLUTION_REQ_TYPE_NONE, "The eidolon gains 20 percent concealment when not in bright light. If the eidolon also has the " "shadow form evolution, this benefit increases to 50 percent."); diff --git a/fight.c b/fight.c index 6c8b5625..90d43f28 100755 --- a/fight.c +++ b/fight.c @@ -1163,7 +1163,7 @@ int compute_armor_class(struct char_data *attacker, struct char_data *ch, if (attacker && has_teamwork_feat(ch, FEAT_DUCK_AND_COVER) && teamwork_using_shield(ch, FEAT_DUCK_AND_COVER) && is_using_ranged_weapon(attacker, TRUE)) bonuses[BONUS_TYPE_INSIGHT] += 2; - + if (has_one_thought(ch)) bonuses[BONUS_TYPE_INSIGHT] += 1; @@ -1277,7 +1277,7 @@ void update_pos_dam(struct char_data *victim) act("$n's die hard toughness let's $m push through.", FALSE, victim, 0, 0, TO_ROOM); GET_HIT(victim) = 1; } - else if (IS_NPC(victim) && MOB_FLAGGED(victim, MOB_EIDOLON) && victim->master && !IS_NPC(victim->master) && HAS_FEAT(victim->master, FEAT_LIFE_LINK) && + else if (IS_NPC(victim) && MOB_FLAGGED(victim, MOB_EIDOLON) && victim->master && !IS_NPC(victim->master) && HAS_FEAT(victim->master, FEAT_LIFE_LINK) && GET_HIT(victim->master) > 0 && dice(1, 3) == 1 && is_eidolon_in_room(victim->master)) { act("\tYYour life link with $N let's you push through.\tn", FALSE, victim, 0, victim->master, TO_CHAR); @@ -1454,7 +1454,7 @@ bool set_fighting(struct char_data *ch, struct char_data *vict) else SET_BIT_AR(AFF_FLAGS(ch), AFF_FLAT_FOOTED); } - + FIGHTING(ch) = vict; if (!CONFIG_PK_ALLOWED) @@ -1789,12 +1789,14 @@ static void change_alignment(struct char_data *ch, struct char_data *victim) if (GET_ALIGNMENT(victim) < GET_ALIGNMENT(ch) && !rand_number(0, 19)) { if (GET_ALIGNMENT(ch) < 1000) - GET_ALIGNMENT(ch)++; + GET_ALIGNMENT(ch) + ++; } else if (GET_ALIGNMENT(victim) > GET_ALIGNMENT(ch) && !rand_number(0, 19)) { if (GET_ALIGNMENT(ch) > -1000) - GET_ALIGNMENT(ch)--; + GET_ALIGNMENT(ch) + --; } /* new alignment change algorithm: if you kill a monster with alignment A, @@ -2331,9 +2333,9 @@ static void perform_group_gain(struct char_data *ch, int base, /* called for splitting xp in a group (prelim) */ #if defined(CAMPAIGN_DL) - #define BONUS_PER_MEMBER 10 +#define BONUS_PER_MEMBER 10 #else - #define BONUS_PER_MEMBER 2 +#define BONUS_PER_MEMBER 2 #endif static void group_gain(struct char_data *ch, struct char_data *victim) @@ -2383,7 +2385,7 @@ static void group_gain(struct char_data *ch, struct char_data *victim) else base = 0; - /* if mob isn't within X levels, don't give xp -zusuk */ + /* if mob isn't within X levels, don't give xp -zusuk */ #if !defined(CAMPAIGN_DL) if ((GET_LEVEL(victim) + CONFIG_EXP_LEVEL_DIFFERENCE) < party_level) base = 1; @@ -2749,7 +2751,7 @@ int skill_message(int dam, struct char_data *ch, struct char_data *vict, struct obj_data *opponent_weapon = GET_EQ(vict, WEAR_WIELD_1); struct obj_data *weap = GET_EQ(ch, WEAR_WIELD_1); struct obj_data *shield = NULL; - int (*name)(struct char_data * ch, void *me, int cmd, const char *argument); + int (*name)(struct char_data *ch, void *me, int cmd, const char *argument); bool is_ranged = FALSE; if (DEBUGMODE) @@ -3787,7 +3789,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ send_to_char(ch, "%-30s: %d\r\n", "Warlock DR", HAS_FEAT(ch, FEAT_WARLOCK_DR)); } - /* temporary mechanic until we upgrade this system */ + /* temporary mechanic until we upgrade this system */ if (HAS_FEAT(ch, FEAT_PERFECT_SELF)) { damage_reduction += 3; @@ -3809,7 +3811,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (display) send_to_char(ch, "%-30s: %d\r\n", "Raging: Heavy Shrug", 3); } - + if (FIGHTING(ch) && affected_by_spell(ch, SKILL_RAGE) && HAS_FEAT(ch, FEAT_MIGHTY_RAGE)) { damage_reduction += 3; @@ -3896,7 +3898,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (display) send_to_char(ch, "%-30s: %d\r\n", "Lich Bonus", 4); } - + if (IS_VAMPIRE(ch) && !IN_SUNLIGHT(ch)) { damage_reduction += 10; @@ -3906,11 +3908,11 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (HAS_FEAT(ch, FEAT_ONE_OF_US)) { - damage_reduction += 5; - if (display) + damage_reduction += 5; + if (display) send_to_char(ch, "%-30s: %d\r\n", "One of Us", 5); } - + else if (HAS_FEAT(ch, FEAT_DEATHS_GIFT)) { if (CLASS_LEVEL(ch, CLASS_SORCERER) >= 9) @@ -3927,7 +3929,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (display) send_to_char(ch, "%-30s: %d\r\n", "Aura of Depravity", 1); } - + if (HAS_FEAT(ch, FEAT_AURA_OF_RIGHTEOUSNESS)) { damage_reduction += 1; @@ -3941,7 +3943,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (display) send_to_char(ch, "%-30s: %d\r\n", "Holy Warrior", 2); } - + if (HAS_FEAT(ch, FEAT_HOLY_CHAMPION)) { damage_reduction += 2; @@ -3949,13 +3951,13 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ send_to_char(ch, "%-30s: %d\r\n", "Holy Champion", 2); } - if (HAS_FEAT(ch, FEAT_UNHOLY_WARRIOR)) + if (HAS_FEAT(ch, FEAT_UNHOLY_WARRIOR)) { damage_reduction += 2; if (display) send_to_char(ch, "%-30s: %d\r\n", "Unholy Warrior", 2); } - + if (HAS_FEAT(ch, FEAT_UNHOLY_CHAMPION)) { damage_reduction += 2; @@ -4029,7 +4031,7 @@ int compute_damage_reduction_full(struct char_data *ch, int dam_type, bool displ if (display) send_to_char(ch, "%-30s: %d\r\n", "Evolution(Damage Reduction)", HAS_EVOLUTION(ch, EVOLUTION_DAMAGE_REDUCTION) * 3); } - + if (GET_DR_MOD(ch) != 0) { damage_reduction += GET_DR_MOD(ch); @@ -4374,7 +4376,7 @@ int damage_handling(struct char_data *ch, struct char_data *victim, damage_reduction = compute_energy_absorb(victim, dam_type); dam -= compute_energy_absorb(victim, dam_type); } - + if (!IS_WEAPON(attacktype)) { /* once Damage Reduction is ready to launch, this should be removed */ @@ -5093,15 +5095,14 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, return 0; } - #if defined(CAMPAIGN_DL) if (IS_NPC(ch)) { - dam = MAX(MIN(dam, NPC_DAMAGE_CAP), 0); // damage cap + dam = MAX(MIN(dam, NPC_DAMAGE_CAP), 0); // damage cap } else { - dam = MAX(MIN(dam, DAMAGE_CAP), 0); // damage cap + dam = MAX(MIN(dam, DAMAGE_CAP), 0); // damage cap } #else dam = MAX(MIN(dam, 1499), 0); // damage cap @@ -5154,7 +5155,12 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, /* xp gain for damage, limiting it more -zusuk */ if (ch != victim && GET_EXP(victim) && (GET_LEVEL(ch) - GET_LEVEL(victim)) <= 3) - gain_exp(ch, GET_LEVEL(victim) * dam, GAIN_EXP_MODE_DAMAGE); + { + if (IS_NPC(ch) && MOB_FLAGGED(ch, MOB_EIDOLON) && ch->master) + gain_exp(ch->master, GET_LEVEL(victim) * dam, GAIN_EXP_MODE_DAMAGE); + else + gain_exp(ch, GET_LEVEL(victim) * dam, GAIN_EXP_MODE_DAMAGE); + } if (!dam) update_pos(victim); @@ -5509,7 +5515,6 @@ int compute_damage_bonus(struct char_data *ch, struct char_data *vict, send_to_char(ch, "United We Stand Bonus: \tR+4\tn\r\n"); } - /* strength bonus */ switch (attack_type) { @@ -5785,8 +5790,8 @@ int compute_damage_bonus(struct char_data *ch, struct char_data *vict, if (HAS_FEAT(ch, FEAT_DOUBLE_WEAPON_SPECIALIZATION) && is_using_double_weapon(ch)) { if (display_mode) - send_to_char(ch, "DoubleWeapon specializiation: \tR2\tn\r\n"); - dambonus += 2; + send_to_char(ch, "DoubleWeapon specializiation: \tR2\tn\r\n"); + dambonus += 2; } if (!display_mode) @@ -6445,7 +6450,7 @@ int determine_critical_multiplier(struct char_data *ch, struct obj_data *wielded #define MODE_DISPLAY_OFFHAND 3 #define MODE_DISPLAY_RANGED 4 */ int compute_dam_dice(struct char_data *ch, struct char_data *victim, - struct obj_data *wielded, int mode) + struct obj_data *wielded, int mode, int attack_type) { int diceOne = 0, diceTwo = 0; bool is_ranged = FALSE; @@ -6579,6 +6584,61 @@ int compute_dam_dice(struct char_data *ch, struct char_data *victim, diceOne = GET_OBJ_VAL(wielded, 1); diceTwo = GET_OBJ_VAL(wielded, 2); } + else if (is_evolution_attack(attack_type)) + { + diceOne = 1; + switch (attack_type) + { + case ATTACK_TYPE_PRIMARY_EVO_BITE: + case ATTACK_TYPE_PRIMARY_EVO_GORE: + case ATTACK_TYPE_PRIMARY_EVO_RAKE: + case ATTACK_TYPE_PRIMARY_EVO_TAIL_SLAP: + switch (GET_SIZE(ch)) + { + case SIZE_LARGE: + diceTwo = 8; break; + case SIZE_HUGE: + diceTwo = 10; break; + case SIZE_COLOSSAL: + diceTwo = 12; break; + default: + diceTwo = 6; break; + } + break; + case ATTACK_TYPE_PRIMARY_EVO_CLAWS: + case ATTACK_TYPE_PRIMARY_EVO_HOOVES: + case ATTACK_TYPE_PRIMARY_EVO_PINCERS: + case ATTACK_TYPE_PRIMARY_EVO_STING: + case ATTACK_TYPE_PRIMARY_EVO_TENTACLE: + case ATTACK_TYPE_PRIMARY_EVO_REND: + case ATTACK_TYPE_PRIMARY_EVO_TRAMPLE: + switch (GET_SIZE(ch)) + { + case SIZE_LARGE: + diceTwo = 6; break; + case SIZE_HUGE: + diceTwo = 8; break; + case SIZE_COLOSSAL: + diceTwo = 10; break; + default: + diceTwo = 4; break; + } + break; + case ATTACK_TYPE_PRIMARY_EVO_WING_BUFFET: + switch (GET_SIZE(ch)) + { + case SIZE_LARGE: + diceTwo = 4; break; + case SIZE_HUGE: + diceTwo = 6; break; + case SIZE_COLOSSAL: + diceTwo = 8; break; + default: + diceTwo = 3; break; + } + break; + } + } else { // barehand compute_barehand_dam_dice(ch, &diceOne, &diceTwo); @@ -6745,18 +6805,11 @@ int compute_hit_damage(struct char_data *ch, struct char_data *victim, /* calculate how much damage to do with a given hit() */ if (mode == MODE_NORMAL_HIT) { - if (is_evolution_attack(attack_type)) + /* determine weapon dice damage (or lack of weaopn) */ + dam = compute_dam_dice(ch, victim, wielded, mode, attack_type); + if (HAS_DRAGON_BOND_ABIL(ch, 10, DRAGON_BOND_CHAMPION)) { - dam = determine_evolution_attack_damage_dice(ch, attack_type); - } - else - { - /* determine weapon dice damage (or lack of weaopn) */ - dam = compute_dam_dice(ch, victim, wielded, mode); - if (HAS_DRAGON_BOND_ABIL(ch, 10, DRAGON_BOND_CHAMPION)) - { - dam += compute_dam_dice(ch, victim, wielded, mode); - } + dam += compute_dam_dice(ch, victim, wielded, mode, attack_type); } /* add any modifers to melee damage: strength, circumstance penalty, fatigue, size, etc etc */ @@ -7100,7 +7153,7 @@ int compute_hit_damage(struct char_data *ch, struct char_data *victim, { dam += 10; if (victim && ((d20(ch) + compute_cmb(ch, COMBAT_MANEUVER_TYPE_KNOCKDOWN)) > - (d20(victim) + compute_cmd(victim, COMBAT_MANEUVER_TYPE_KNOCKDOWN)))) + (d20(victim) + compute_cmd(victim, COMBAT_MANEUVER_TYPE_KNOCKDOWN)))) { change_position(victim, POS_SITTING); act("You knock $N to the ground!", FALSE, ch, 0, victim, TO_CHAR); @@ -7126,7 +7179,7 @@ int compute_hit_damage(struct char_data *ch, struct char_data *victim, (IS_LN(victim)) || (IS_LE(victim)) || (IS_NPC(victim) && HAS_SUBRACE(victim, SUBRACE_LAWFUL)))) - { + { send_combat_roll_info(ch, "\tW[CHAOS]\tn "); send_combat_roll_info(victim, "\tR[CHAOS]\tn "); dam += dice(2, 6); @@ -7216,7 +7269,7 @@ int compute_hit_damage(struct char_data *ch, struct char_data *victim, mode == MODE_DISPLAY_RANGED) { /* calculate dice */ - dam = compute_dam_dice(ch, ch, wielded, mode); + dam = compute_dam_dice(ch, ch, wielded, mode, attack_type); /* modifiers to melee damage */ dam += compute_damage_bonus(ch, ch, wielded, TYPE_UNDEFINED_WTYPE, NO_MOD, mode, attack_type); } @@ -7697,7 +7750,8 @@ void weapon_spells(struct char_data *ch, struct char_data *vict, random = rand_number(1, 100); if (GET_WEAPON_CHANNEL_SPELL_PCT(wpn, i) >= random) { - GET_WEAPON_CHANNEL_SPELL_USES(wpn, i)--; + GET_WEAPON_CHANNEL_SPELL_USES(wpn, i) + --; act("Your channelled spell erupts from $p.", TRUE, ch, wpn, 0, TO_CHAR); act("A channelled spell erupts from $p.", TRUE, ch, wpn, 0, TO_ROOM); WEAPON_SPELL_PROC(ch) = TRUE; @@ -7854,7 +7908,7 @@ int weapon_special(struct obj_data *wpn, struct char_data *ch, char *hit_msg) return 0; extern struct index_data *obj_index; - int (*name)(struct char_data * ch, void *me, int cmd, const char *argument); + int (*name)(struct char_data *ch, void *me, int cmd, const char *argument); name = obj_index[GET_OBJ_RNUM(wpn)].func; @@ -8084,7 +8138,7 @@ int compute_attack_bonus(struct char_data *ch, /* Attacker */ if (affected_by_spell(ch, SPELL_EFFECT_GRAND_DESTINY)) { - bonuses[BONUS_TYPE_CIRCUMSTANCE] += 4; + bonuses[BONUS_TYPE_CIRCUMSTANCE] += 4; } if (HAS_REAL_FEAT(ch, FEAT_FURY_OF_THE_SMALL) && victim && GET_SIZE(ch) < GET_SIZE(victim)) @@ -8147,7 +8201,7 @@ int compute_attack_bonus(struct char_data *ch, /* Attacker */ { bonuses[BONUS_TYPE_INSIGHT] = MIN((affected_by_spell(ch, PSIONIC_ABILITY_PSIONIC_FOCUS) ? 10 : 5), GET_INT_BONUS(ch)); } - + if (has_one_thought(ch)) bonuses[BONUS_TYPE_INSIGHT] += 1; @@ -8281,7 +8335,7 @@ int compute_attack_bonus(struct char_data *ch, /* Attacker */ // double weapon focus if (HAS_FEAT(ch, FEAT_DOUBLE_WEAPON_FOCUS) && is_using_double_weapon(ch)) { - bonuses[BONUS_TYPE_UNDEFINED] += 1; + bonuses[BONUS_TYPE_UNDEFINED] += 1; } if (victim) @@ -8746,7 +8800,6 @@ int attack_roll(struct char_data *ch, /* Attacker */ if (GET_TOUCH_SPELL_QUEUED(ch) == SPELL_SHOCKING_GRASP && is_touch && is_wearing_metal(victim)) attack_bonus += 3; - int diceroll = d20(ch); int result = ((attack_bonus + diceroll) - victim_ac); @@ -8836,7 +8889,8 @@ int attack_of_opportunity(struct char_data *ch, struct char_data *victim, int pe if (GET_TOTAL_AOO(ch) < (!HAS_FEAT(ch, FEAT_COMBAT_REFLEXES) ? 1 : GET_DEX_BONUS(ch))) { - GET_TOTAL_AOO(ch)++; + GET_TOTAL_AOO(ch) + ++; return hit(ch, victim, TYPE_ATTACK_OF_OPPORTUNITY, DAM_RESERVED_DBC, penalty, FALSE); } else @@ -9322,7 +9376,8 @@ int handle_successful_attack(struct char_data *ch, struct char_data *victim, char hit_msg[32] = ""; int sneakdam = 0; /* Additional sneak attack damage. */ bool victim_is_dead = FALSE; - GET_CONSECUTIVE_HITS(ch)++; + GET_CONSECUTIVE_HITS(ch) + ++; if (affected_by_spell(ch, SPELL_RIGHTEOUS_VIGOR)) { @@ -10070,7 +10125,7 @@ int handle_successful_attack(struct char_data *ch, struct char_data *victim, process_weapon_abilities(wielded, ch, victim, ACTMTD_ON_HIT, NULL); if (IS_EFREETI(ch)) damage(ch, victim, dice(2, 6), TYPE_SPECAB_FLAMING, DAM_FIRE, FALSE); - + if (is_evolution_attack(attack_type)) { process_evolution_elemental_damage(ch, victim); @@ -10601,7 +10656,7 @@ int hit(struct char_data *ch, struct char_data *victim, int type, int dam_type, struct obj_data *opp_wpn = get_wielded(victim, ATTACK_TYPE_PRIMARY); if (opp_wpn && !rand_number(0, 3)) { - int (*name)(struct char_data * victim, void *me, int cmd, const char *argument); + int (*name)(struct char_data *victim, void *me, int cmd, const char *argument); name = obj_index[GET_OBJ_RNUM(opp_wpn)].func; if (name) (name)(victim, opp_wpn, 0, "parry"); @@ -10627,7 +10682,7 @@ int hit(struct char_data *ch, struct char_data *victim, int type, int dam_type, struct obj_data *opp_wpn = get_wielded(victim, ATTACK_TYPE_PRIMARY); if (opp_wpn && !rand_number(0, 3)) { - int (*name)(struct char_data * victim, void *me, int cmd, const char *argument); + int (*name)(struct char_data *victim, void *me, int cmd, const char *argument); name = obj_index[GET_OBJ_RNUM(opp_wpn)].func; if (name) (name)(victim, opp_wpn, 0, "parry"); @@ -11380,7 +11435,6 @@ int perform_attacks(struct char_data *ch, int mode, int phase) } else { - // not dual wielding numAttacks++; // default of one attack for everyone @@ -11448,7 +11502,7 @@ int perform_attacks(struct char_data *ch, int mode, int phase) numAttacks += 2; perform_evolution_attack(ch, mode, phase, ATTACK_TYPE_PRIMARY_EVO_CLAWS, DAM_SLICE); perform_evolution_attack(ch, mode, phase, ATTACK_TYPE_PRIMARY_EVO_CLAWS, DAM_SLICE); - + if (FIGHTING(ch)) { if (HAS_EVOLUTION(ch, EVOLUTION_BLEED) && GET_CONSECUTIVE_HITS(ch) > 0) @@ -11549,8 +11603,6 @@ int perform_attacks(struct char_data *ch, int mode, int phase) GET_CONSECUTIVE_HITS(ch) = 0; } - - // execute the calculated attacks from above if (VITAL_STRIKING(ch)) bonus_mainhand_attacks = 0; diff --git a/limits.c b/limits.c index 20c1040e..72de235f 100755 --- a/limits.c +++ b/limits.c @@ -179,7 +179,8 @@ void affliction_tick(struct char_data *ch) /* creeping doom */ else if (DOOM(ch)) { - call_magic(ch, NULL, NULL, SPELL_DOOM, 0, DIVINE_LEVEL(ch), CAST_SPELL); + call_magic(ch, NULL, NULL, SPELL_AFFECT_CREEPING_DOOM_BITE, 0, DIVINE_LEVEL(ch) + GET_CALL_EIDOLON_LEVEL(ch), CAST_SPELL); + call_magic(ch, NULL, NULL, POISON_TYPE_CENTIPEDE_STRONG, 0, DIVINE_LEVEL(ch) + GET_CALL_EIDOLON_LEVEL(ch), CAST_SPELL); DOOM(ch)--; if (DOOM(ch) <= 0) { diff --git a/magic.c b/magic.c index 2f120e6f..b877d517 100755 --- a/magic.c +++ b/magic.c @@ -931,6 +931,22 @@ void mag_loops(int level, struct char_data *ch, struct char_data *victim, num_times = MIN(5, (level + 1) / 2); dam = true; break; + case SPELL_LESSER_MISSILE_STORM: + num_times = MIN(10, level); + dam = true; + break; + case SPELL_MISSILE_STORM: + num_times = MIN(20, level); + dam = true; + break; + case SPELL_SCORCHING_RAY: + num_times = MIN(3, 1 + ((level - 3) / 4)); + dam = true; + break; + case SPELL_FLAME_ARROW: + num_times = (level - 2) / 3; + dam = true; + break; /* case SPELL_MAGIC_STONE: num_times = MIN(5, (level + 1) / 2); dam = true; @@ -1591,8 +1607,8 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim, save = SAVING_REFL; mag_resist = TRUE; element = DAM_FIRE; - num_dice = MIN(15, level); - size_dice = 10; + num_dice = MIN(10, level); + size_dice = 6; bonus = 0; break; @@ -1677,6 +1693,15 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim, bonus = 0; break; + case SPELL_AFFECT_CREEPING_DOOM_BITE: // conjuration + save = SAVING_FORT; + mag_resist = FALSE; + element = DAM_PIERCING; + num_dice = 8; + size_dice = 6; + bonus = 0; + break; + case SPELL_FLAME_BLADE: // evocation if (SECT(ch->in_room) == SECT_UNDERWATER) { @@ -1759,25 +1784,25 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim, size_dice = 4; bonus = 1; } - element = DAM_FORCE; + element = DAM_ENERGY; break; - - case SPELL_MISSILE_STORM: // evocation - save = SAVING_REFL; + + case SPELL_LESSER_MISSILE_STORM: // evocation mag_resist = TRUE; - element = DAM_FORCE; - num_dice = MIN(26, level); - size_dice = 10; - bonus = level; + save = -1; + num_dice = 1; + size_dice = 6; + bonus = 0; + element = DAM_ENERGY; break; - case SPELL_LESSER_MISSILE_STORM: // evocation - save = SAVING_REFL; + case SPELL_MISSILE_STORM: // evocation + save = -1; mag_resist = TRUE; - element = DAM_FORCE; - num_dice = MIN(20, level); - size_dice = 10; - bonus = level; + element = DAM_ENERGY; + num_dice = 2; + size_dice = 6; + bonus = 0; break; case SPELL_NEGATIVE_ENERGY_RAY: // necromancy @@ -1838,8 +1863,17 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim, save = -1; mag_resist = TRUE; element = DAM_FIRE; - num_dice = MIN(12, level * 2); - size_dice = 4; + num_dice = 4; + size_dice = 6; + bonus = 0; + break; + + case SPELL_FLAME_ARROW: // evocation + save = SAVING_REFL; + mag_resist = TRUE; + element = DAM_FIRE; + num_dice = 4; + size_dice = 6; bonus = 0; break; @@ -4789,6 +4823,12 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, act("$n evades the tentacles.", FALSE, ch, 0, victim, TO_ROOM); return; } + if (affected_by_spell(victim, PSIONIC_SLIP_THE_BONDS)) + { + send_to_char(ch, "Your spell is resisted!\r\n"); + send_to_char(victim, "You avoid the effect due to your slip the bonds manifestation!\r\n"); + return; + } if (affected_by_spell(victim, SPELL_BLACK_TENTACLES)) { affect_from_char(victim, SPELL_BLACK_TENTACLES); @@ -5575,6 +5615,12 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, act("$n evades the tentacles.", FALSE, ch, 0, victim, TO_ROOM); return; } + if (affected_by_spell(victim, PSIONIC_SLIP_THE_BONDS)) + { + send_to_char(ch, "Your spell is resisted!\r\n"); + send_to_char(victim, "You avoid the effect due to your slip the bonds manifestation!\r\n"); + return; + } if (affected_by_spell(victim, SPELL_GREATER_BLACK_TENTACLES)) { act("$N is already affected by greater black tentacles.", FALSE, ch, 0, victim, TO_CHAR); @@ -5600,6 +5646,12 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, act("$n evades the tentacles.", FALSE, ch, 0, victim, TO_ROOM); return; } + if (affected_by_spell(victim, PSIONIC_SLIP_THE_BONDS)) + { + send_to_char(ch, "Your spell is resisted!\r\n"); + send_to_char(victim, "You avoid the effect due to your slip the bonds manifestation!\r\n"); + return; + } if (affected_by_spell(victim, SPELL_BLACK_TENTACLES)) { affect_from_char(victim, SPELL_BLACK_TENTACLES); @@ -6113,8 +6165,16 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, af[0].duration = (level * 12) + 100; af[0].modifier = 1; af[0].bonus_type = BONUS_TYPE_SIZE; + af[1].location = APPLY_STR; + af[1].duration = (level * 12) + 100; + af[1].modifier = +2; + af[1].bonus_type = BONUS_TYPE_SIZE; + af[2].location = APPLY_DEX; + af[2].duration = (level * 12) + 100; + af[2].modifier = -2; + af[2].bonus_type = BONUS_TYPE_SIZE; to_vict = "You feel yourself growing!"; - to_room = "$n's begins to grow much larger!"; + to_room = "$n begins to grow much larger!"; break; case SPELL_ANT_HAUL: // transmutation @@ -6275,6 +6335,12 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, return; if (AFF_FLAGGED(victim, AFF_FREE_MOVEMENT)) return; + if (affected_by_spell(victim, PSIONIC_SLIP_THE_BONDS)) + { + send_to_char(ch, "Your spell is resisted!\r\n"); + send_to_char(victim, "You avoid the effect due to your slip the bonds manifestation!\r\n"); + return; + } SET_BIT_AR(af[0].bitvector, AFF_ENTANGLED); af[0].duration = 10 + level; @@ -6360,6 +6426,12 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, return; if (mag_savingthrow(ch, victim, SAVING_REFL, 0, casttype, level, EVOCATION)) return; + if (affected_by_spell(victim, PSIONIC_SLIP_THE_BONDS)) + { + send_to_char(ch, "Your spell is resisted!\r\n"); + send_to_char(victim, "You avoid the effect due to your slip the bonds manifestation!\r\n"); + return; + } SET_BIT_AR(af[0].bitvector, AFF_ENTANGLED); af[0].duration = dice(2, 4) - 1; @@ -6985,7 +7057,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, af[0].duration = (level * 12) + 100; af[0].modifier = 2 + (level / 5); to_vict = "You feel more hardy!"; - to_room = "$n's begins to feel more hardy!"; + to_room = "$n begins to feel more hardy!"; break; case SPELL_MASS_GRACE: // transmutation @@ -7656,7 +7728,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim, af[0].duration = (level * 12) + 100; af[0].modifier = -1; to_vict = "You feel yourself shrinking!"; - to_room = "$n's begins to shrink to being much smaller!"; + to_room = "$n begins to shrink to being much smaller!"; break; case SPELL_PLANAR_HEALING: // conjuration @@ -9105,6 +9177,10 @@ void mag_areas(int level, struct char_data *ch, struct obj_data *obj, to_char = "You conjure a storm of ice that blankets the area!"; to_room = "$n conjures a storm of ice, blanketing the area!"; break; + case SPELL_FIREBALL: + to_char = "You hurl a bead of flame which explodes into a conflagration!"; + to_room = "$n hurls a bead of flame which explodes into a conflagration!"; + break; case SPELL_INCENDIARY: // incendiary cloud break; case SPELL_INSECT_PLAGUE: @@ -9394,7 +9470,7 @@ static const char *mag_summon_msgs[] = { "$N charges into the area, looks left, then right... " /* 17 */ "then quickly moves next to $n.", // 18 dire boar "$N moves into the area, sniffing cautiously.", // 19 dire wolf - "$N neighs and walks up to $n.", // 20 phantom steed + "$N walks up to $n.", // 20 phantom steed "$N skitters into the area and moves next to $n.", // 21 dire spider "$N lumbers into the area and moves next to $n.", // 22 dire bear "$N manifests with an ancient howl, then moves towards $n.", // 23 hound @@ -9439,7 +9515,7 @@ static const char *mag_summon_to_msgs[] = { "$N charges into the area, looks left, then right... " // 17 "then quickly moves next to you.", // 18 dire boar "$N moves into the area, sniffing cautiously.", // 19 dire wolf - "$N neighs and walks up to you.", // 20 phantom steed + "$N walks up to you.", // 20 phantom steed "$N skitters into the area and moves next to you.", // 21 dire spider "$N lumbers into the area and moves next to you.", // 22 dire bear "$N manifests with an ancient howl, then moves towards you.", // 23 hound @@ -10849,6 +10925,14 @@ void mag_unaffects(int level, struct char_data *ch, struct char_data *victim, to_notvict = "$N looks like $E can move again."; break; + case PSIONIC_SLIP_THE_BONDS: + spell = SPELL_WEB; + affect = AFF_ENTANGLED; + to_char = "You remove the entanglements from $N."; + to_vict = "$n removes the entanglements from you."; + to_notvict = "$N looks like $E can move again."; + break; + case SPELL_FAERIE_FOG: spell = SPELL_INVISIBLE; affect = AFF_INVISIBLE; diff --git a/psionics.c b/psionics.c index 7eae992d..acf065ba 100644 --- a/psionics.c +++ b/psionics.c @@ -135,7 +135,7 @@ void assign_psionic_powers(void) psiono(PSIONIC_INTELLECT_FORTRESS, "intellect fortress", 7, false, 0, 0, PSYCHOKINESIS, TAR_CHAR_ROOM, false, MAG_GROUPS, "The intellect fortress guarding your mind expires.", 4); psiono(PSIONIC_MOMENT_OF_TERROR, "moment of terror", 7, true, 4, 100, TELEPATHY, TAR_CHAR_ROOM | TAR_NOT_SELF, true, MAG_AFFECTS, "Your terrors finally fade away.", 4); psiono(PSIONIC_POWER_LEECH, "power leech", 7, false, 0, 0, TELEPATHY, TAR_CHAR_ROOM | TAR_NOT_SELF, true, MAG_AFFECTS, "You finally expel the power leech from your psyche.", 4); - psiono(PSIONIC_SLIP_THE_BONDS, "slip the bonds", 7, false, 0, 0, PSYCHOPORTATION, TAR_CHAR_ROOM | TAR_SELF_ONLY, false, MAG_AFFECTS, "Your psychic ability to slip bonds has expired.", 4); + psiono(PSIONIC_SLIP_THE_BONDS, "slip the bonds", 7, false, 0, 0, PSYCHOPORTATION, TAR_CHAR_ROOM | TAR_SELF_ONLY, false, MAG_AFFECTS | MAG_UNAFFECTS, "Your psychic ability to slip bonds has expired.", 4); psiono(PSIONIC_WITHER, "wither", 7, true, 4, 4, PSYCHOMETABOLISM, TAR_CHAR_ROOM | TAR_NOT_SELF, true, MAG_AFFECTS, "Your withered limbs and body finally return to normal.", 4); psiono(PSIONIC_WALL_OF_ECTOPLASM, "wall of ectoplasm", 7, false, 0, 0, METACREATIVITY, TAR_IGNORE, false, MAG_MANUAL, "The wall of ectoplasm hardens and falls to dust.", 4); diff --git a/shop.c b/shop.c index cf002bfe..c820a9f6 100755 --- a/shop.c +++ b/shop.c @@ -897,6 +897,7 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee char tempstr[MAX_INPUT_LENGTH] = {'\0'}, name[MAX_INPUT_LENGTH] = {'\0'}, tempbuf[MAX_INPUT_LENGTH] = {'\0'}; struct obj_data *obj; int sellnum, sold = 0, goldamt = 0; + char objname[200]; if (!(is_ok(keeper, ch, shop_nr))) return; @@ -921,6 +922,8 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee if (!(obj = get_selling_obj(ch, name, keeper, shop_nr, TRUE))) return; + snprintf(objname, sizeof(objname), "%s", obj->short_description); + if (/*!IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH) &&*/ GET_GOLD(keeper) + SHOP_BANK(shop_nr) < sell_price(obj, shop_nr, keeper, ch)) @@ -966,7 +969,7 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee increase_gold(ch, goldamt); strlcpy(tempstr, times_message(0, name, sold), sizeof(tempstr)); - snprintf(tempbuf, sizeof(tempbuf), "$n sells %s.", tempstr); + snprintf(tempbuf, sizeof(tempbuf), "$n sells %s.", objname); act(tempbuf, FALSE, ch, obj, 0, TO_ROOM); if (shop_index[shop_nr].message_sell != NULL) @@ -975,7 +978,7 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee snprintf(tempbuf, sizeof(tempbuf), "%s I will give you %d coins for that.", GET_NAME(ch), goldamt); do_tell(keeper, tempbuf, cmd_tell, 0); - send_to_char(ch, "The shopkeeper now has %s.\r\n", tempstr); + send_to_char(ch, "The shopkeeper now has %s.\r\n", objname); if (GET_GOLD(keeper) < MIN_OUTSIDE_BANK) { diff --git a/spell_parser.c b/spell_parser.c index 3ebadc25..2e01253b 100755 --- a/spell_parser.c +++ b/spell_parser.c @@ -2072,7 +2072,10 @@ ACMDU(do_gen_cast) int circle = 99, school = 0; if (IS_NPC(ch)) + { + handle_npc_cast(ch, argument, subcmd); return; + } /* different cast types are divided here */ switch (subcmd) @@ -3356,7 +3359,7 @@ void mag_assign_spells(void) spell_info[SPELL_SHOCKING_GRASP].touch_spell = TRUE; spello(SPELL_SCORCHING_RAY, "scorching ray", 0, 0, 0, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_LOOPS, NULL, 2, 9, EVOCATION, FALSE); spello(SPELL_CONTINUAL_FLAME, "continual flame", 0, 0, 0, POS_FIGHTING, TAR_IGNORE, FALSE, MAG_CREATIONS, @@ -3455,7 +3458,10 @@ void mag_assign_spells(void) TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL, 3, 11, EVOCATION, FALSE); spello(SPELL_FIREBALL, "fireball", 44, 29, 1, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_AREAS, + NULL, 3, 11, EVOCATION, FALSE); + spello(SPELL_FLAME_ARROW, "flame arrow", 44, 29, 1, POS_FIGHTING, + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_LOOPS, NULL, 3, 11, EVOCATION, FALSE); spello(SPELL_WATER_BREATHE, "water breathe", 79, 64, 1, POS_FIGHTING, TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, @@ -3550,7 +3556,7 @@ void mag_assign_spells(void) // 4th circle /* evocation */ spello(SPELL_LESSER_MISSILE_STORM, "lesser missile storm", 72, 57, 1, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_LOOPS, NULL, 4, 13, EVOCATION, FALSE); spello(SPELL_ICE_STORM, "ice storm", 58, 43, 1, POS_FIGHTING, TAR_IGNORE, TRUE, MAG_AREAS, @@ -3772,7 +3778,7 @@ void mag_assign_spells(void) TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS, NULL, 6, 19, EVOCATION, FALSE); // grapples opponent spello(SPELL_MISSILE_STORM, "missile storm", 72, 57, 1, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_LOOPS, NULL, 6, 19, EVOCATION, FALSE); spello(SPELL_SUNBEAM, "sunbeam", 0, 0, 0, POS_FIGHTING, TAR_IGNORE, TRUE, MAG_AREAS | MAG_ROOM, @@ -4944,6 +4950,9 @@ spello(SPELL_IDENTIFY, "!UNUSED!", 0, 0, 0, 0, TAR_IGNORE, TRUE, 0, NULL, 0, 0, NOSCHOOL, FALSE); + spello(SPELL_AFFECT_CREEPING_DOOM_BITE, "creeping doom bite", 1, 1, 1, POS_FIGHTING, TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_DAMAGE, + NULL, 1, 1, CONJURATION, FALSE); + // poisons spello(POISON_TYPE_SCORPION_WEAK, "weak scorpion poison", 1, 1, 1, POS_FIGHTING, TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_DAMAGE | MAG_AFFECTS, "The weak scorpion poison fully passes through your system.", 1, 1, NOSCHOOL, FALSE); @@ -5801,6 +5810,190 @@ sbyte isPrimordialMagic(struct char_data *ch, int spellnum) return false; } +void handle_npc_cast(struct char_data *ch, char *argument, int subcmd) +{ + struct char_data *out_to = ch; + struct char_data *victim = NULL; + char *spell_arg = NULL; + char *target_arg = NULL; + int spellnum = 0; + + if (!IS_NPC(ch)) + return; + + if (MOB_FLAGGED(ch, MOB_EIDOLON)) + { + if (ch->master && IN_ROOM(ch) == IN_ROOM(ch->master)) + out_to = ch->master; + } + + if (MOB_FLAGGED(ch, MOB_EIDOLON)) + { + if (HAS_EVOLUTION(ch, EVOLUTION_WEB) && spellnum == SPELL_WEB) + { + if (!is_action_available(ch, atSWIFT, true)) + return; + } + } + + if (!is_action_available(ch, atSTANDARD, true)) + return; + + spell_arg = strtok(argument, "'"); + + if (spell_arg == NULL) + { + send_to_char(out_to, "Cast what where?\r\n"); + return; + } + + spell_arg = strtok(NULL, "'"); + + if (spell_arg == NULL) + { + send_to_char(out_to, "Spell names must be enclosed in the Powerful ' Symbols: '\r\n"); + return; + } + + target_arg = strtok(NULL, "\0"); + + spellnum = find_skill_num(spell_arg); + + if ((spellnum < 1) || (spellnum > MAX_SPELLS) || !*spell_arg) + { + send_to_char(out_to, "No spell exists by that name.\r\n"); + return; + } + + if (!npc_can_cast(ch, spellnum)) + { + send_to_char(out_to, "Your pet cannot cast that spell.\r\n"); + return; + } + + // We will need to add more checks if we expand the list of spells that mobs can cast found in the + // npc_can_cast function + if (IS_SET(SINFO.targets, TAR_IGNORE)) + { + call_magic(ch, ch, 0, spellnum, 0, GET_LEVEL(ch), CAST_SPELL); + return; + } + + if (IS_SET(SINFO.targets, TAR_SELF_ONLY)) + { + call_magic(ch, ch, 0, spellnum, 0, GET_LEVEL(ch), CAST_SPELL); + return; + } + + if (target_arg != NULL) + { + skip_spaces(&target_arg); + } + if (target_arg == NULL) + { + victim = ch; + } + else if (IS_SET(SINFO.targets, TAR_CHAR_ROOM)) + { + victim = get_char_vis(ch, target_arg, NULL, FIND_CHAR_ROOM); + } + else if (IS_SET(SINFO.targets, TAR_CHAR_WORLD)) + { + victim = get_char_vis(ch, target_arg, NULL, FIND_CHAR_WORLD); + } + else + { + send_to_char(out_to, "That is not an eligible NPC-castable spell.\r\n"); + return; + } + + if (victim == NULL) + { + send_to_char(out_to, "You can't seem to find the target of your spell.\r\n"); + return; + } + + if (SINFO.violent == TRUE && !aoeOK(ch, victim, spellnum)) + { + send_to_char(out_to, "That spell cannot be cast on a friendly target.\r\n"); + return; + } + + if (IS_SET(SINFO.targets, TAR_NOT_SELF)) + { + if (ch == victim) + { + send_to_char(out_to, "Your pet cannot cast that spell on themselves.\r\n"); + return; + } + } + + call_magic(ch, victim, 0, spellnum, 0, GET_LEVEL(ch), CAST_SPELL); + + if (MOB_FLAGGED(ch, MOB_EIDOLON)) + { + if (HAS_EVOLUTION(ch, EVOLUTION_WEB) && spellnum == SPELL_WEB) + { + USE_SWIFT_ACTION(ch); + return; + } + } + + USE_STANDARD_ACTION(ch); +} + +bool npc_can_cast(struct char_data *ch, int spellnum) +{ + if (MOB_FLAGGED(ch, MOB_EIDOLON)) + { + if (HAS_EVOLUTION(ch, EVOLUTION_WEB) && spellnum == SPELL_WEB) + { + return true; + } + if (HAS_EVOLUTION(ch, EVOLUTION_BASIC_MAGIC)) + { + switch (spellnum) + { + case SPELL_DAZE_MONSTER: + case SPELL_DETECT_MAGIC: + case SPELL_BALL_OF_LIGHT: + case SPELL_ACID_SPLASH: + case SPELL_RAY_OF_FROST: + case SPELL_TOUCH_OF_FATIGUE: + return true; + } + } + if (HAS_EVOLUTION(ch, EVOLUTION_MINOR_MAGIC)) + { + switch (spellnum) + { + case SPELL_BURNING_HANDS: + case SPELL_DETECT_ALIGN: + case SPELL_MAGIC_MISSILE: + case SPELL_OBSCURING_MIST: + case SPELL_MINOR_ILLUSION: + return true; + } + } + if (HAS_EVOLUTION(ch, EVOLUTION_MAJOR_MAGIC)) + { + switch (spellnum) + { + case SPELL_ACID_ARROW: + case SPELL_DARKNESS: + case SPELL_INVISIBLE: + case SPELL_LESSER_RESTORATION: + case SPELL_LEVITATE: + case SPELL_SCORCHING_RAY: + case SPELL_DETECT_INVIS: + case SPELL_SPIDER_CLIMB: + return true; + } + } + } + return false; +} + /* must be at end of file */ #undef SINFO /**************************/ diff --git a/spells.c b/spells.c index 7ed02d7e..873f14e8 100755 --- a/spells.c +++ b/spells.c @@ -1547,7 +1547,7 @@ ASPELL(spell_creeping_doom) send_to_char(ch, "You summon forth a mass of centipede swarms!\r\n"); act("$n summons forth a mass of centipede swarms!", FALSE, ch, 0, 0, TO_ROOM); - DOOM(ch) = MAX(1, (DIVINE_LEVEL(ch) + GET_CALL_EIDOLON_LEVEL(ch)) / 4); + DOOM(ch) = MAX(1, (DIVINE_LEVEL(ch) + GET_CALL_EIDOLON_LEVEL(ch))); } ASPELL(spell_detect_poison) diff --git a/spells.h b/spells.h index f970f0ee..6827aaec 100755 --- a/spells.h +++ b/spells.h @@ -582,9 +582,10 @@ #define SPELL_GREATER_RAPID_BUFF 506 #define SPELL_POWER_WORD_SILENCE 507 #define SPELL_HOLY_AURA 508 +#define SPELL_FLAME_ARROW 509 /** Total Number of defined spells */ -#define NUM_SPELLS 509 +#define NUM_SPELLS 510 #define LAST_SPELL_DEFINE NUM_SPELLS + 1 #define MAX_SPELL_AFFECTS 6 /* change if more needed */ @@ -679,6 +680,7 @@ #define AFFECT_PRESCIENCE 1277 #define AFFECT_PRESCIENCE_DEBUFF 1278 #define AFFECT_GLORYS_CALL 1279 +#define SPELL_AFFECT_CREEPING_DOOM_BITE 1280 // 1470 to 1493 are poisons with room saved for more poisons up to 1498 @@ -1551,7 +1553,11 @@ struct wall_information /******/ #define NUM_WALL_TYPES 7 /****/ +#if defined(CAMPAIGN_DL) +#define WALL_ITEM 13818 +#else #define WALL_ITEM 101220 +#endif /* object values for walls */ #define WALL_TYPE 0 /* type, effect */ #define WALL_DIR 1 /* direction blocking */ @@ -1734,6 +1740,8 @@ ACMD_DECL(do_gen_cast); #define SCMD_WEAPON_TOUCH 4 ACMD_DECL(do_manifest); void display_shadowcast_spells(struct char_data *ch); +void handle_npc_cast(struct char_data *ch, char *argument, int subcmd); +bool npc_can_cast(struct char_data *ch, int spellnum); ACMD_DECL(do_abort); void unused_spell(int spl); diff --git a/utils.c b/utils.c index 74adaa96..7f1e4387 100755 --- a/utils.c +++ b/utils.c @@ -962,6 +962,8 @@ int is_immune_to_crits(struct char_data *attacker, struct char_data *target) if (affected_by_spell(target, PSIONIC_SHADOW_BODY)) return TRUE; + if (affected_by_spell(target, PSIONIC_BODY_OF_IRON)) + return TRUE; if (HAS_FEAT(target, FEAT_ESSENCE_OF_UNDEATH)) return true; @@ -9406,7 +9408,7 @@ int get_encumbrance_mod(struct char_data *ch) { if ((obj = GET_EQ(ch, i)) != NULL) { - for (j = 0; j < NUM_APPLIES; j++) + for (j = 0; j < 6; j++) { if (obj->affected[j].location == APPLY_ENCUMBRANCE) {