--- crossfire/server ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: spell_util.c
Revision 1.112qal21 2006/09/16 15:01:12 +2 -2
Implement proposed alchemy changes from the mailing list. Make value of nuggets given range from 5% to 40%. Depends on archetype changes to the alchemy spell and nuggets.
Show difference between Revision 1.111 and 1.112
Revision 1.111ryo_saeba 2006/09/03 08:29:36 +2 -2
Fix bug #1551371 (No-magic prevents monsters from casting spells)
Show difference between Revision 1.110 and 1.111
Revision 1.110ryo_saeba 2006/08/19 16:23:15 +2 -2
DMs can cast denied spells, that's why they are DMs.
Show difference between Revision 1.109 and 1.110
Revision 1.109ryo_saeba 2006/07/25 17:37:22 +4 -2
Fix bug #1528194. Fix an annoying message.
Show difference between Revision 1.108 and 1.109
Revision 1.108gros 2006/07/25 13:17:43 +2 -4
Correct improper selection of the target of some spells, when the spell
is cast on a transport. Hopefully definitively fixes bug #1528018.
gros - 2006/07/25
Show difference between Revision 1.107 and 1.108
Revision 1.107gros 2006/07/25 11:23:31 +43 -24
Make the search for a friendly target for some spells also browse transports
located in the square from which the spell was cast.
This is a fix for bug #1528018.
gros - 2006/07/25
Show difference between Revision 1.106 and 1.107
Revision 1.106mwedel 2006/06/05 01:28:56 +9 -2
Clean up some compiler warnings. Most of the changes are related to replaced
%lld with FMT64 defines so that the format will be correct, no matter if
the 64 bit type is a long, long long, or if this is windows. #if 0 out a
bunch of code that isn't used.
--
common/exp.c: Replaced lld with FMT64
common/holy.c: #if 0 out baptize_altar(). Add banner copyright at top of file.
common/info.c, common/item.c, common/loader.l, common/loader.c, common/map.c:
common/porting.c Replaced lld with FMT64
common/time.c: Replace a bunch of variables declared as longs to be uint32.
Update various sprintf appropriately.
include/global.h: Add FMT64 and FMT64U as appropriate for different systems.
Change max_time to be a uint32
include/sockproto.h, include/sproto.h: rebuilt
server/apply.c: #if 0 out monster_apply_special
server/c_range.c: Add != 0 in assignment if statement - same meaning, clearer
on intention and avoids compiler warning.
server/c_wiz.c: Update command_kick() to take const char. Update command_speed()
to operate properly based on max_time being a uint32. Update various lld
to FMT64. Clarify ambiguous if/if/else statement in command_insert_into()
server/commands.c: Add cast to command_kick for new function prototype. #if
0 out find_command(), parse_string(), parse_command()
server/disease.c: #if 0 out find_disease(), reduce_symptoms()
server/egoitem.c: #if 0 out create_artifact(). Add copyright at top of file.
server/gods.c: #if 0 out get_god()
server/hiscore.c: Replace lld with FMT64
server/login.c: #if 0 out create_savedir_if_needed()
server/resurrection.c: Replace lld with FMT64. #if 0 out dead_character() and
dead_player_exists()
server/server.c: Remove info_keys() - hasn't been used in a long time. #if 0
out process_active_maps()
server/skill_util.c: Replace lld with FMT64
server/spell_util.c: #if 0 out check_spell_effect()
server/weather.c: #if 0 out feather_map(). Fix what I suspect is an error
in worldmap_to_weathermap() to skip over starting slashes.
socket/image.c: Add a fair number of char * casts to suppress warnings.
socket/init.c: Change buflen in init_connection() to socklen_t to match
function prototype. Add some char * casts.
socket/loop.c: Add some char * casts.
--
MSW 2006-06-04
Show difference between Revision 1.105 and 1.106
Revision 1.105ryo_saeba 2006/05/05 04:26:35 +6 -6
First part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.104 and 1.105
Revision 1.104tchize 2006/04/06 16:18:36 +6 -6

finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other
Show difference between Revision 1.103 and 1.104
Revision 1.103cavesomething 2006/01/09 13:35:13 +2 -2
spell listing support
Show difference between Revision 1.102 and 1.103
Revision 1.102akirschbaum 2005/12/05 17:34:04 +3 -3
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.101 and 1.102
Revision 1.101mwedel 2005/11/16 02:16:09 +15 -9
Commit for new blocking code. Not going to dictate all the changes -
but will outline the broad points. Note also that the
doc/Developers/objects is updated and goes into more details also.
- check for P_WALL no longer used - instead, need to use GET_MAP_MOVE_BLCOK
and check against movement type of objects.
- arch_blocked() changed to ob_blocked(), now takes object. Needed because
just looking at archetype move_ values is no longer sufficient.
- find_first_free_spot() changed to take object, since it just calls
arch_blocked()
- FLAG_FLYING removed, now in move type.
- walk_on/walk_off/fly_on/fly_off removed - now based on move_on and
move_off fields.
- Map space structure extended to hold the move_on/move_off, etc
values so that we can shortcut some processing by not having to
check every object on the space when something enters it if
move_on isn't set.
- archetypes recollected - boulders needed move_walk to properly trigger
buttons.
- Note that the new plugin code has to be fixed up for the new movement
code. Look for FIXME in plugins/cfpython/cfpython_object.c
MSW 2005-11-15
Show difference between Revision 1.100 and 1.101
Revision 1.100akirschbaum 2005/10/28 14:08:53 +2 -2
Fix compiler warnings. Most changes do not change the program (remove unused
variables, convert "if(x = y)" into "x = y; if(x)"); a few actually fix
(possible) problems (fix uninitialized variables, fix printf format
specifiers, fix mismatches between signed and unsigned variables, add missing
return and default statements).
Show difference between Revision 1.99 and 1.100
Revision 1.99ryo_saeba 2005/10/16 03:48:30 +2 -2
Don't stack WoR effects. Don't display 'can't recast xx' message for divine intervention
Show difference between Revision 1.98 and 1.99
Revision 1.98akirschbaum 2005/10/07 14:38:50 +5 -5
Make damage done by area spells not depend on monster size.
include/sproto.h, server/attack.c: Add additional parameter "full_hit" to
hit_map() and hit_player(). If set, do full damage, if unset scale down by
monster size.
server/{apply.c, attack.c, disease.c, monster.c, player.c, rune.c,
spell_attack.c, spell_effect.c, spell_util.c, time.c}: Change callers to set
"full_hit" parameter according to the attack used.
Show difference between Revision 1.97 and 1.98
Revision 1.97ryo_saeba 2005/10/01 12:46:05 +2 -2
Patches #1307880 and #1306987 courtesy quisar
Show difference between Revision 1.96 and 1.97
Revision 1.96ryo_saeba 2005/09/24 04:49:49 +3 -3
Fixes after party patch
Show difference between Revision 1.95 and 1.96
Revision 1.95akirschbaum 2005/09/09 16:09:41 +2 -2
Allow a DM to cast spells and prayers in no-magic/no-prayer areas. Add new
command "wizcast" to toggle this setting.
Show difference between Revision 1.94 and 1.95
Revision 1.94ryo_saeba 2005/08/12 03:18:59 +6 -6
Use const char* instead of char* when possible
Show difference between Revision 1.93 and 1.94
Revision 1.93ryo_saeba 2005/07/15 03:02:00 +2 -2
Use on_same_map instead of comparing pointers
Show difference between Revision 1.92 and 1.93
Revision 1.92ryo_saeba 2005/07/10 16:12:14 +34 -1
Tentative party spell - needs to be really tested
Show difference between Revision 1.91 and 1.92
Revision 1.91ryo_saeba 2005/04/27 16:43:29 +3 -3
Change some char* to const char*
Show difference between Revision 1.90 and 1.91
Revision 1.90mwedel 2005/01/12 02:04:02 +5 -1
aclocal.m4, configure: Add check for python 2.4.
common/re-cmp.c: Fix improper comparison *(str+1) instead of str+1
server/login.c: don't allow null names.
server/main.c: Disable logging of removed objects - filling up log
files on archmage of all the errors.
server/player.c: Fix improper initialization of attacktype in
for loop. Give players max grace, sp when they die - also, if they
are near starvation, give them a bunch of food.
server/spell_effect.c: Put cap on duration of godly retribution - it
can otherwise last so long that if a player is killed by it at
their savebed location, spell could still go on after players
temporary immunity ends. Retribution as increases in damage,
so no need to really increase damage and duration to really high
amounts.
server/spell_util.c: In fire_arch_from_position(), and check that
player isn't casting spell on top of wall - fixes for many
spells, including ball lightning.
server/time.c: Change comparsion on return of get_map_flags() from
== P_OUT_OF_MAP to & P_OUT_OF_MAP - keeps syntax consistent.
MSW 2005-01-11
Show difference between Revision 1.89 and 1.90
Revision 1.89mwedel 2004/06/18 02:45:29 +3 -2
server/c_wiz.c: for command_create() - check to see if 'of' parameter
is a spell archetype name, and do the right thing if it is. This
allows things like 'create rod_heavy of spell_large_lightning'.
Note that the command_create is still a seriously broken function
in many regards.
server/rune.c: Fix write_rune() when trying to find the spell in encase
in the rune - assignment was incorrect, so it always took the last
matching spell in the players inventory, not the best matching spell.
server/spell_util.c: Change the call to prayer_failure() so that its
potency is based on how badly short the player is short of grace. Eg,
if only 1 point short, potency of 1. This changes from before where
the potency was always the difference in mana.
MSW 2004-06-17
Show difference between Revision 1.88 and 1.89
Revision 1.88mwedel 2004/05/14 01:41:27 +7 -1
server/spell_util.c: SP_level_spellpoint_cost() - never have a spell
cost 0 spellpoints due to attunement or other bonuses - spell always
cost at least 1 sp/grace.
MSW 2004-05-13
Show difference between Revision 1.87 and 1.88
Revision 1.87mwedel 2004/05/11 01:57:38 +6 -4
server/spell_util.c: Fix cast_spell() so that failed spells (due to
encumberance or other penalties) still cost some random number of grace/
mana points.
MSW 2004-05-10
Show difference between Revision 1.86 and 1.87
Revision 1.86mwedel 2004/04/18 02:59:36 +3 -3
common/button.c: Patch by Bernd Edler to have proper speed set for items
activated by buttons.
server/apply.c: Apply the 'special prayer' marker stuff, since it wasn't
used anymore.
server/gods.c: Check for FLAG_EQUIP on spells and not for a special prayer
marker to guess if a spell is a god given spell or not.
server/spell_util.c: Patch by Bernd Edler so that firewalls are immune
to casting time.
MSW 2004-04-17
Show difference between Revision 1.85 and 1.86
Revision 1.85mwedel 2004/03/23 01:52:32 +46 -40
server/attack.c: Add missing skill=NULL in kill_object() - can be rare
cases where the proper skill can't be found.
server/move.c: Fix push_object() so that it also updates the pushers/
pushees map - should only happen in tiled map cases.
server/pets.c: Fix summon_object() so that if a summon cult monsters was
cast, we try to find the god from the owner. If still can't find the
god, just return instead of crashing.
server/rune.c: Change trap_disarm() to call destroy_object() on the
trap object, so that all the trapss inventory is also destroyed
and not dumped on the ground.
server/skills.c: Only players without arms to steal.
server/spell_util.c: Change cast_spell to set up the skill pointer for the
caster even if the caster is the wizard.
MSW 2004-03-22
Show difference between Revision 1.84 and 1.85
Revision 1.84mwedel 2004/02/16 18:22:25 +8 -1
doc/Developers/spells: Update type on casting_time - include suggested value
for times so that results are hopefully more coherent.
lib/archetypes, treasures.bld: rebuilt.
lib/treasures: Change some of the 'spelldirect' types to just the actual spells,
so that two seperate archs don't have to be maintained.
server/c_wiz.c: Add some basic sanity checking to command_remove() so that
we don't unnecessarily crash.
server/skills.c: write_scroll() - have it reset value of the scroll so that
the scrolls so inscribed by players have better chance of merging.
server/spell_attack.c: cast_cone() - if the caster is a trap, have it hit
the center space, so that characters who detonate cone traps will get hit
by the effects. Also, reduce range of cone spells if they are going
in all directions, compared to being targetted in a speciifc direction.
server/spell_util.c: cast_spell() - put lower limit on player speed_left value
when casting spells - since higher up the calling stack, the player speed
is also reduced, we need to set the lower limit here so that the player
isn't out of action longer than they should be.
MSW 2004-02-16
Show difference between Revision 1.83 and 1.84
Revision 1.83mwedel 2004/01/25 00:51:22 +2 -2
Minor bug fixes
treasure.c: add_abilities() - fix problem with not using the correct event
pointer if an artifact had more than two events tied to it (or perhaps
if the object already had one event tied to it, and we are adding
another event)
server/spell_util.c: put_a_monster() - set map for all parts of a multi
part object. prayer_failure() - remove free_object after call of
cast_magic_storm.
MSW 2004-01-24
Show difference between Revision 1.82 and 1.83
Revision 1.82mwedel 2004/01/16 01:52:51 +19 -6
Fix a bunch of crashes observed on metalforge:
server/player.c: do_hidden_move(): Move call to find skill so that it is
always called.
server/skills.c: write_scroll(): Fix freeing of spell object in
scroll - newscroll->inv isn't valid after calling remove_ob, so
need to copy object to temporary pointer first.
server/spell_effect.c: cast_detection(): Pass in skill to use. If no
skill in use, use the caster object - fixes pointer derefence
as op->chosen_skill wasn't always set.
server/spell_util.c: modify caster_level() to always return at least 1.
Fixes pointer potential divide by zero problems - also guarantees
that players will be able to cast first level spells even if
repelled to that spellpath. ok_to_put_more() - Fix to use correct
map pointer variable. find_target_for_friendly_spell() - make it
so it handles tiled maps OK.
MSW 2003-01-15
Show difference between Revision 1.81 and 1.82
Revision 1.81mwedel 2003/11/30 23:45:18 +6 -4
server/rune.c: Fix it so that players won't be hit by traps if they are
not next to them when set off (firing arrows at a door for example).
server/spell_util.c: Fix spell_failure() to properly damage player if they
fumble. Fix cast_spell() to not complain about not having enough
grace if the spell doesn't take grace. Add same check for mana, but that
is much less likely, as harder to get negative mana.
socket/request.c: Fix problem where map sending code was not properly avoiding
duplicating the head of a big image on multiple layers. This bug most often
manifested itself of player standing on lower right corner of large building,
and something else standing on other portion of building - player would seem
to disappear.
MSW 2003-11-30
Show difference between Revision 1.80 and 1.81
Revision 1.80mwedel 2003/09/13 00:02:13 +1089 -2271
Updated code for skill + spell code. skills and spells are now objects.
tuning these now means changing the archetypes. New spells can now
be added just by making a new archetype. Lots of code cleanup
also done.
MSW 2003-09-12
Show difference between Revision 1.79 and 1.80
Revision 1.79tchize 2003/09/03 07:25:06 +18 -18

generator may now use their inventory as a basis to generated items
instead of the other_arch field. Will allow more fine tuned generators
Show difference between Revision 1.78 and 1.79
Revision 1.78mwedel 2003/03/21 02:01:11 +24 -13
server/spell_effect.c: Some code cleanuip to cast_change_attr - mostly
to combine the processing of the stat improving spells together.
The actual change to playability is that bless and holy possession
don't stack if cast multiple times.
server/spell_util.c: Modify create_aura so that player can't have more than
one aura (of the same type) active at a time.
MSW 2003-03-20
Show difference between Revision 1.77 and 1.78
Revision 1.77mwedel 2003/02/22 01:26:56 +5 -2
server/spell_effect.c: clean up town_portal to use its own arch's
so it doesn't have to reset so many fields. Also, fix crash.
server/spell_util.c: Update cast_create_obj to put new object below
casting up.
lib/*: Rebuilt
MSW 2003-02-21
Show difference between Revision 1.76 and 1.77
Revision 1.76mwedel 2003/02/03 01:23:48 +2 -2
More bugfixes:
include/shop.h: remove _SHOP_H after endif, causing compiler warnings.
include/skills.h: Add check to USING_SKILL to make sure chosen_skill
is not null.
server/c_chat.c: Add some missing return values, resulting in compiler
warnings.
server/skill_util.c: Remove unused variable. compiler warnings again.
server/spell_effect.c: Change dimension door so that you can't go
through spaces that block passsage and also block view (eg walls).
This goes back to the more traditional behaviour. Remove
some unused variables.
server/spell_util.c: Add missing P_OUT_OF_MAP to move_missile, resulting
in crashes.
server/time.c: if generator is not on a map, don't have it generates.
Fixes crashes.
MSW 2003-02-02
Show difference between Revision 1.75 and 1.76
Revision 1.75mwedel 2003/01/23 01:38:44 +2 -2
More bug fixes:
server/player.c: Call fix_player after lifesaving device is used to reset
body location values.
server/spell_effect.c, server/spell_util.c: Add some more P_OUT_OF_MAP
checks.
MSW 2003-01-22
Show difference between Revision 1.74 and 1.75
Revision 1.74mwedel 2003/01/17 00:23:55 +5 -3
More bug fixes:
common/item.c: Add missing braces - was resulting in some items getting
display like 'gauntlets of strength (Str+1)(Str+1).
include/map.h: Add MAGIC_MAP definitions to the file.
server/shop.c: Put back in code that uses magic_mapping_mark to determine
what items to display in inventory. Update for new one magic mapping
code stores information away.
server/spell_util.c: Add missing P_OUT_OF_FLAG check, which resulted
in crashes.
socket/info.c: Move MAGIC_MAP definations to map.h. Add check for
P_OUT_OF_MAP. Remove code that stops on P_NO_MAGIC - with that
it wouldn't search the shops.
MSW 2003-01-16
Show difference between Revision 1.73 and 1.74
Revision 1.73mwedel 2003/01/08 02:39:21 +1176 -1040
Bulk of this commit is to improve code for tiled maps - replace
wall/blocks_magic/blocks_cleric, etc with get_map_flags which
also does map tiling translation as needed. This should fix a lot
of the bugs related to map tiling (there are sure to be more out
there - all the get_map_ob still need to be checked).
Other changes - many spells stopped progressing on spaces that
blocked view - that is now removed - didn't make a lot of sense.
Other fixes - some cleric spells (eg, word of recall) checked to
see if magic was prohibited, didn't check to see if cleric
was prohibited.
Clean up some bugs in the lighting code that would cause erroneous
results. Also, allow players to see immediately around them on
outdoor maps no matter how dark the map really is - behaviour
on indoor maps is the same.
Lots of code reformatted, and lots of obsoleted/dead code removed.
Add max range to dimension door.
Fix magic map - got broken when the layer stuff was redone - was
not showing proper colors. IT also works sensibly on tiled maps
now - rather than display based on the map, it gives the player a
50x50 area centered on where the player is.
Change fire_bow - move special player fire modes into own function -
makes code much cleaner.
Hopefully this fixes more bugs than it introduces.
common/los.c, common/map.c, common/object.c, crossedit/Edit.c,
include/libproto.h, include/sockproto.h, include/map.h,
include/spellist.h, include/sproto.h, random_maps/treasure.c,
random_maps/wall.c, server/attack.c, server/c_misc.c,
server/c_wiz.c, server/disease.c, server/main.c, server/monster.c,
server/pets.c, server/player.c, server/rune.c, server/shop.c,
server/skill_util.c, server/skills.c, server/spell_effect.c,
server/spell_util.c, server/time.c, socket/info.c: See note above
server/apply.c: Limit number of times weapon can be enchanted so
that it won't overflow item_power. Modify enchant armor
to enchant as normal armor is enchanted, also only allows one
item to be enchanted.
MSW 2002-01-07
Show difference between Revision 1.72 and 1.73
Revision 1.72mwedel 2003/01/03 18:28:52 +2 -2
TODO - add notes about item damage - clear it out of my mailbox.
common/loader.l, loader.c: Add check at load time to see if monsters
hp is higher than its maxhp and print a debug message if so.
devel/Makefile: Remove - makefiles shouldn't be in CVS, only .in versions.
server/attack.c: Fix calculation of max_damage in kill_object - this
was being done incorrectly, resulting in fired spell objects causing
incorrect amounts of damage, resulint in some monsters ending up with
a lot of hp. Fix call to kill_object to pass in correct damage value.
server/monster.c: Put in check so that monster won't regen to more hp
than they should have.
server/spell_util.c: Removed unused variable from move_missile.
server/weather.c: fix bug that causes crash if empty space is encountered
on map.
MSW 2003-01-03
Show difference between Revision 1.71 and 1.72
Revision 1.71garbled 2002/12/25 00:45:46 +4 -4
New Arrow and Pet Code:
Add bowmode and petmode commands. Allowing the player to change the firing
style for bows to one of either threewide, or spreadshot.
Allow players to change the operating modes of his pet with petmode. Can
be either seek and destroy, defend, or normal historical behavior.
Change bows to impart speed to arrows based on damage and other magical
plusses. Damage decays over distance, to stop arrows from flying forever.
Very fast moving arrows will pierce multiple targets. An arrow moving at a
speed greater than 10.0 will go straight through a target, losing 1.0 of
speed in the process.
Change magic missile to use spell_find_dir instead of find_dir to stop it
from flying in a circle and hitting the caster, and to make it stop
flying into walls to hit creatures behind the walls.
Show difference between Revision 1.70 and 1.71
Revision 1.70garbled 2002/11/12 23:24:54 +18 -18
#ifdef SPELLPOINT_LEVEL_DEPEND -> settings.spellpoint_level_depend
#ifdef EXPLORE_MODE -> settings.explore_mode
While I was here.. make explore mode actually *work*. It didn't even
have an entry in the commands array.
Show difference between Revision 1.69 and 1.70
Revision 1.69garbled 2002/11/12 18:49:47 +52 -55
#ifdef CASTING_TIME -> settings.casting_time
Show difference between Revision 1.68 and 1.69
Revision 1.68garbled 2002/11/12 18:26:13 +5 -7
#ifdef SPELL_ENCUMBRANCE -> settings.spell_encumbrance
#ifdef SPELL_FAILURE_EFFECTS -> settings.spell_failure_effects
Show difference between Revision 1.67 and 1.68
Revision 1.67mwedel 2002/10/03 02:07:44 +2 -1
Bugfixes: Add golem_count element to player structure so we can properly
detect when golem is destroyed. This fixes a crash in some places as the
code tried to remove this already removed golem.
Fix crash when null player maps.
include/player.h: Add golem_count element to player structure.
server/player.c: Add code in handle_newscs_player() that checks status of
golem, clears op->contr->golem is value is bogus
server/spell_effect.c, server/spell_util.c: Initialize golem_count
value when golem is created.
socket/request.c: Check for null map value.
MSW 2002-10-04
Show difference between Revision 1.66 and 1.67
Revision 1.66mwedel 2002/09/07 17:08:07 +2 -2
Automake patch - all files.
The changes for the source files is using confdir instead of
datadir.
Patch by Jacek Konieczny (jajcus@bnet.pl), applied by Mark Wedel,
2002-09-07.
Show difference between Revision 1.65 and 1.66
Revision 1.65mwedel 2002/07/25 01:57:14 +11 -35
Various bug fixes, add glyph spell:
TODO: Updated
common/map.c: Fix change_map_light() - if darkness was reduced to zero,
it wouldn't properly notify the players or update the maps they are
on. Also, make it more robust to handle changes by more than one.
include/define.h: Increase NROFREALSPELLS
include/spellist.h: Add glyph spell.
include/spells.h: Add SP_GLYPH entry.
server/attack.c: Fix up kill_object() - it has had some many various
additions that it was difficult to follow the logic. It should also now
do better check on skill objects when awarding experience.
server/player.c: Add some checks/addition to properly deal with freeing the
name_pl in the player object. Fix it so that if you are braced, you
still won't attack friendly creatures.
server/rune.c: Add cast_generic_rune() to handle the glyph and rune spell.
server/spell_effect.c: Fix up some pointers in cast_cause_disease() -
needed so that it works properly when embedded in a glyph. Have it
return 1 even if no one caught anything - you still cast the spell, so
you should lose the grace for it.
server/spell_util.c: Fix some formatting. Break out the code dealing
with rune into cast_generic_rune()
socket/loop.c: Add flag to player command mapping, and update structure -
if flag is set, command can only be issued when player is in play,
and not when waiting at the quit or login prompt - fixes crashes where
players could wait for the map to get swapped out (after quitting), and
then looking at a space.
socket/request.c: Fix map2cmd so that invisible players are drawn.
MSW 2002-07-24
Show difference between Revision 1.64 and 1.65
Revision 1.64mwedel 2002/07/14 23:57:13 +5 -22
-- Start body commit notes --
Major commit. This adds body locations which is used for equipping items.
Equipment has information which body part it gets equipped to, and monsters
have information on how which body locations they can have.

As part of this work, I also did a lot of code cleanup.

To use this, you must use up to date archetypes - the ones included
in this commit are fine - just make sure you install them. If
you don't, players will not be able to equip items.

common/arch.c: Initialize body_used to be same as body_info for
archetypes - this way when monsters are created, they can
start equipping items right away.
common/exp.c: update new_exp() - some flags it checked for before no longer
exist or have new names.
common/info.c: describe_item() now takes second parameter - update
dump_abilities to use new calling convention.
common/item.c: Add table that describes the body_info locations and
their names. Add functions that calculate item power for objects
that don't have it set. Update display functions to show
item_power in items. Update describe_monster() - use_horn/wand/rod
merged into just use_range. Modify describe_item() to take second
paramater - who the item is being described for. Show item_power
in describe_item.
common/living.c: Pull out MAXLEVEL from being defined in this file -
define in in define.h, since other files use it. Add NUM_STATS
define - replace hard coded values of having just 7 stats with it.
Update change_abil to not display that the player has a new
attacktype when equipping a bow that has it - fix_player() ignores
the attacktype of the bow, so it was incorrect information.
fix_player(): Initialize player ranges structure to null -
will get filled in by code in function, updated to deal with
updating the body_used data from body_info in the objects.
Replace instances of last_heal with gen_sp_armour. Rearrange
some code to make function more readable.
common/loader.c, common/loader.l: Remove the variable_const information - no
longer needed and confusing for new people when adding in new object
elements. Add set_body_info() - parses the string from the load file and
sets the appropriate array element. Add check_loaded_object() - does
sanity checking for an object after finished loading - replaces need for
long processing directive in the actual rules by having seperate function.
Remove unused flags from load directives (apply_once, no_pretext,
can_apply), add some new ones (item_power, gen_sp_armour), update others
to can_use_range. Replace flag_links with simple array that contains the
name for each corresponding flag. Update get_ob_diff to not use the V_
values and just include the actual string name - all recent changes have
done this, just updated for old stuff. Update get_ob_diff to save new
values that have been added.
common/object.c: clear_object: Modify to use memset to clear
the structure to zero - this is less error prone than listing
all the specific values, and probably faster. Also, makes it
easier to add new elements - no need to update object.c in most
cases.
common/player.c: Remove get_player_ob routine - this is now merged
in with get_player_ob in server/player.c. Remove generate_ext_title -
not used.
common/readable.c: Update to pass second argument to describe_item.
common/treasure.c: Update to calculate item_power of generated items.
Clean up a lot of code formatting. Update add_abilities
to use gen_sp_armour values, not last heal (note, it appears
the last_heal values weren't being used before). Update
calls to describe item to take second parameter.
doc/Developers/objects: Update will_apply notes, add note about
item_power, body location.
include/define.h: Comment out unused flags (flag_apply_once, flag_paralyzed,
flag_no_pretext, flag_ready_rod, flag_read_horn). Add flag_use_shield.
rename flag_use_wand to flag_use_range. rename flag_ready_wand to
flag_ready_range. Add flag_ready_scroll. Update ARMOUR_SPELLS access
macro. Add AP_PRINT flag to apply flags. Add CAN_APPLY_.. return types
for can_apply_object function.
include/includes.h: add strftime, mktime checks to this file.
include/libproto.h: rebuilt.
include/living.h: Add NUM_STATS define, update extern declarations
to use it for sizing.
include/loader.h: remove the V_.. info and xbm_.. externs that were not
used.
include/newserver.h: Remove ext_tile information.
include/object.h: Add Body_Locations structure, NUM_BODY_LOCATIONS define.
Add definitions for WILL_APPLY values. Clean up object structure -
formatting is now consistent, ordering of values groups values
together more logically. Update all types to use the int8/int16/int32
types. Several unused fields removed.
include/player.h: Update rangetype enum. Add unapplymode enum.
Clean up player structure - type updates, unused fields removed,
formatting fixed up.
include/spells.h: remove range_name extern. Update SpellTypeFrom
field to combine wand/rod/horn into spellMisc - none of the
spell casting code was differentiating these.
include/sproto.h: rebuilt.
lib/Makefile.in: Add new help files (applymode, bind, brace)
lib/archetypes: rebuilt for body_info, gen_sp_armour, item_power,
can_use_shield information.
lib/artifacts: updated for item_poer and gen_sp_armour changes.
lib/treasures: remove unused _force for player treasure.
plugin/plugin_python.c: Change FLAG_USE_WAND to FLAG_USE_RANGE.
server/apply.c: Move stftime, mktime to include/includes.h. Remove
draw_find() - one line function can just as easly be in the
code itself. Update calls to long_desc to pass second parameter.
move gravestone_text() to player.c file. Add direction parameter to
apply_scroll() - in this way monsters can use it properly.
Remove dead code. Update apply_special function. Add
unapply_special(), get_item_from_body_location(), unapply_for_ob(),
and can_apply_object() functions.
server/attack.c: Remove SET_FLAG(op, FLAG_PARALYZED) line - no code
was ever checking status of FLAG_PARALYZED.
server/c_misc.c: add command_body() which dumps body information for
player. Update who as idle element in player structure removed -
was not being used by anything. Add command_applymode() to
set players prefered unapply method. Remove calls to unlock_player()
in various functions - unlock_player() has not done anything
meaningful for a while.
server/c_object.c: Modify long_desc to take a second parameter
which is who is examing the object. this is needed so that we
can pass it down to some of the lower level functions.
Update calls to describe_item to pass this second parameter.
remove FLAG_NO_PRETEXT code - no archetyps were using it. When
examining objects, also tell player where to put them on.
server/c_range.c: Update legal_range() - we now store the object that
is responsible for a range in the player object, so code is
much simpler. Update change_spell() to not destroy golem
just by readying another spell - we now let players regain control
of golems after switching to another range. Update change_spell
to use item name of object for range description.
server/c_wiz.c: remove reference to count_left from player object -
field removed from structure.
server/commands.c: add new commands (applymode, body) to command dispatch
table.
server/login.c: Remove unlock_player() and lock_player() and calls to it -
current checking of names at login should be sufficient to
prevent duplicates. Remove dead code from check_name. Update
load/save code for unapply mode value. Add set_flag(op,
FLAG_USE_SHIELD) if player is allowed to use armor - needed since
flag_use_shield is really a class feature and so is not automatically
updated for old player files.
server/main.c: Remove references to count_left. memset marker object to
NULL - seems to increase stability on metalforge server.
server/monster.c: Many updates related to the body info - monsters follow some
rules as players. Add monster_should_cast_spell function - monsters will
use this for all spellcasting related actions (abilities, scrolls, wands,
etc). Update for merged rod/horn/wand ranges. Update bow use by monsters
- they don't actually need to equip it to fire - this way we don't need to
constantly swap the monsters weapons between the bow and melee item. Use
fire_bow from player.c for most of the work. Modify scroll usage -
monster will use it when player is near, not when it first picks it up.
Add FLAG_READY_SCROLL to denote the monster has a scroll to use. Also,
monster now casts it in appropriate direciton. Merge the
monster_use_wand/rod/horn into monster_use_range. Modify
check_good_weapon and check_good_armour to just look at the stats of the
two items without needing the monster to apply it first.
server/player.c: Print motd in green so it is more noticable. Update
get_player function to do work it did before as well as that of
get_player_ob. Have get_player take a parameter which is the object of
the player if he has one. Modify to use memset to clear the player
structure - more sure fire than explicitly listing values to initialize.
Remove calls to unlock_player. Modify fire_bow so that monsters can also
use the function. Add fire_misc_object() to fire_wand/rod/horn - removes
code from fire(). Add gravesetone_text() to this file.
server/shop.c: Update to pass second parameter to describe_item().
server/skill_util.c: Update check_skill_to_fire since there are fewer
rangetypes now. change range_scroll name to range_golem, as that is
a bit more accurate for what it actually does. Modify show_skills()
to show player his item power and total of items he has equipped.
server/skills.c: Add second paramater to long_desc, remove references to
count_left.
server/spell_effect.c: Add second paramater to long_desc, remove references to
count_left. Update range_scroll to range_golem
server/spell_util.c: remove references to count_left. Update messages
if player trying to cast where he can't with new range names.
socket/info.c: Update range information and how we display what it is -
we will use the object name of the range if available. Remove
reference last_known_spell, last_shoot, last_spell, last_value
player structure fields.
socket/init.c: Remove ext_title information.
socket/request.c: Add element for life_stealing in the resistance array.
Remove references to idle, count_left in player structure. remove
ext2 title information.
MSW 2002-07-14
-- End body commit notes --
Show difference between Revision 1.63 and 1.64
Revision 1.63darth_bob 2001/12/23 02:09:05 +2 -1
A hole pointed out by Mark.. This should mean Rabies is fully functioning
Show difference between Revision 1.62 and 1.63
Revision 1.62mwedel 2001/12/03 01:51:46 +23 -111
This checkin for the most part removes support for xpm and xbm graphics -
now the only image supported is the png.
common/arch.c: comment out printing on warning of object having no type -
getting 300 meaningless messages at startup is annoying.
common/image.c: Remove X11 color information from colorname array. Remove
processing of color_fg and color_bg information from face file - only
use color_fg if no magicmap information is available - foreground
and background infoformation was only needed for bitmap graphics.
common/loader.c, loader.l: Add elevation element, comment out some logging
messages that are excessive and only really relevant for people
who want to fix them (really should be in the collect script
anyways). Remove some unused code.
common/map.c: add outdoor field to map structure - add support for loading
and saving it.
crossedit/App.c,crossedit/CrUtil.c, crossedit/Defines.h, crossedit/crossedit.c
crossedit/xutil.c: Remove support for non png graphics.
crossedit/Attr.c: Add support for elevation variable, remove code for non
png graphics.
doc/map-technical: Add note about outdoor field.
include/face.h: remove fg, bg fields from face struecture.
include/global.h: Update colorname array definition.
include/loader.h: Add V_ELEVATION field.
include/map.h: Add outdoor field to map structure.
include/newserver.h: Update types so it only loads/knows about png information.
include/object.h: Add elevation field to object structure.
lib/Makefile.in: Remove support for building crossfire.xpm and crossfire.xbm
files.
lib/animations, lib/archetypes, lib/bmaps, lib/bmaps.paths, lib/crossfire.png,
lib/faces: Rebuilt. Main difference is a few sea types, and the fact
that it hadn't been collected for a while.
server/spell_effect.c: Modify dimension door so that it calls MapNewmapCmd
so that fog of war does not get confused. Also, removes call to
draw as functions further up will do that.
server/spell_util.c: Remove color information from attack information that
shuffle_attack uses.
socket/init.c, socket/request.c: Remove support for non png images.
MSW 2001-12-02
Show difference between Revision 1.61 and 1.62
Revision 1.61pcurrlin 2001/11/01 13:38:43 +8 -1
Added new spell: "missile swarm"
Basically, several magic missiles fired like a bullet swarm.

Philc - Nov 01, 2001
Show difference between Revision 1.60 and 1.61
Revision 1.60garbled 2001/10/15 16:12:08 +14 -14
Remove all instances of RANDOM()% and replace with rndm() from utils.c

garbled 2001-10-15
Show difference between Revision 1.59 and 1.60
Revision 1.59mwedel 2001/10/07 02:40:01 +7 -3
server/spell_util.c: Add out_of_map check to can_see_monsterP. Fixes
crash when casting ball lightning/divine shock (and likely other events)
on maps not surrounded by walls. MSW 2001-10-07
Show difference between Revision 1.58 and 1.59
Revision 1.58garbled 2001/09/26 16:34:08 +26 -29
Apply the big luck patch to all these files. This removes the special
cases for alchemy and prayer as well.

Discussed at length with dhb, av and gros. Has been tested on both the
mids crossfire server, and on my private server.

This code removes all current use of the luck stat for players, and replaces
it with a general luck modifier for all random rolls. The intent of this
code is to give a general positive (or negative) effect on a player due
to luck. This effect should be generally intangible to the player, yet
help him out over the course of a game.

garbled 2001-09-26
Show difference between Revision 1.57 and 1.58
Revision 1.57mwedel 2001/08/21 00:39:31 +22 -14
Enhancements to make monsters 'do the right thing' with relation
to tiled maps (ie, will detect players and attack them if on an adjoining
tiled maps). This involved a rewrite of path_to_player - I've tested this
out, and if anything, it seems that monsters may be more aggressive on
spellcasting.
++
common/map.c: blocked modify to make sure it is checking valid coordinate
value. blocked_link,blocked_two modified to translate for tiled maps.
Add load_and_link_tiled_map which loads a tiled map and links in all
pointers relative to adjoining maps. out_of_map modified to use
this function instead of doing the work itself. Add get_rangevector
function that returns offset, direction, and distance between two
objects, taking into account tiled maps. get_rangevector_from_mapcoord
added which is similar to get_rangevector, but takes a map and coordinates
instead of a second object. on_same_map function added which returns
true if the two objects are on the same logical (ie tiled) maps.
doc/crossfire.doc: Add note about what Int does for monsters.
include/map.h: Add some comments, and add structure for rangevector
function return values.
server/attack.c: add calls to on_same_map instead of doing op->map
comparisons.
server/monster.c: Many functions modified to properly handle tiled
maps properly.
server/pets.c: get_pet_enemy modified to know about tiled maps.
server/player.c: get_nearest_player modified to know about tiled maps.
path_to_player rewritten to know about tiled maps - I think some other
bugs were also fixed in return values. Split player_attack_door
from move_player attack to keep functions a more reasonable size.
move_player_attack, player_can_view modified to know about tiled
maps.
server/skills.c: can detect_enemy modified to take another parameter -
call in steal updated to pass this parameter.
server/spell_util.c: ok_to_put_more, can_see_monsterP modified to
handle tiled maps properly.
socket/item.c: look_at modified to return proper results when player
looks at something on an adjoining tiled map.
++ End of checkin
Show difference between Revision 1.56 and 1.57
Revision 1.56mwedel 2001/07/13 23:11:18 +26 -32
Map tiling checkin
server/Makefile.in: Remove encounter.c file. Use cproto instead of
cextract to create proto file.
server/alchemy.c,server/attack.c,server/c_object.c,server/c_wiz.c,
server/disease.c, server/login.c, server/main.c, server/monster.c,
server/move.c, server/pets.c, server/player.c, server/resurrection.c,
server/rune.c, server/shop.c,server/skill_util.c, server/skills.c,
server/spell_effect.c, server/spell_util.c, server/swap.c, server/time.c
modified to use modified insert_ob_in_map function,
use new macros to access map structure related data.
change calls to update_all_los, remove lighting related code.
server/apply.c: modified to use new insert_ob_in_map function. Update
calls to update_object. remove RANDOM_ENCOUNTER code.
for exits, modified to use the head for valid coordinates since the
other parts may not have valid values since they are not saved out to
disk anymore.
server/c_misc.c,server/hiscore.c: modified to use new map
structure/information.
server/commands.c: remove dumplights command.
server/encounter.c: removed - code no longer used
server/init.c: remove RANDOM_ENCOUNTERS code.
server/script.c: change Script_getMapObject to return NULL since there
is no longer a map object. Modify to use new insert_ob_in_map and
update_object functions.
MSW 2001-07-13
Show difference between Revision 1.55 and 1.56
Revision 1.55michtoen 2001/06/13 07:51:58 +1 -1
Modified Files:
player.c loader.l loader.c init.c request.c newserver.h
Log Message:
Removed 2 compiler warning from Scriptfire patch in loader.l/loader.c
and script.c.

added a new setup cmd: "newanim"
a client giving the newanim cmd, will enable the new animation system.

The interface is open and not server controlled at this moment.
First using is to enable the player moving in 8 direction. Giving this option to a
server without changed arch will invoke broken player animations.
This will be changed in the future.

MT 2001-06-13
Show difference between Revision 1.54 and 1.55
Revision 1.54michtoen 2001/06/13 05:52:14 +4 -1
Modified Files:
aclocal.m4 configure. configure.in Makefile.in
crossfire32.dsw crossfire32.dsp INSTALL_WIN32.txt
common: arch.c loader.c treasure.c loader.l
crossedit: Attr.c
doc: README_EXTENSIONS README_SCRIPT
include: autoconf.h define.h global.h includes.h loader.h
object.h script.h spellist.h spells.h sproto.h
version.h
server: Makefile.in apply.c attack.c c_object.c gods.c init.c
main.c monster.c player.c script.c script_spells.c
script_types.c skills.c spell_effect.c spell_util.c
time.c
Log Message:
Adding Scriptfire 0b11 to Crossfire.
Massive changes. The facts are in the doc files.

MT 2001-06-13
Show difference between Revision 1.53 and 1.54
Revision 1.53mwedel 2001/05/28 23:41:54 +16 -44
Make ALLOW_SKILLS standard part of game (remove #ifdef's for it)
Files affected: common/living.c common/object.c common/treasure.c
include/config.h include/player.h server/apply.c server/attack.c
server/c_move.c server/c_range.c server/c_wiz.c server/commands.c
server/init.c server/login.c server/monster.c server/player.c
server/rune.c server/skill_util.c server/spell_util.c
Make MULTIPLE_GODS standards part of game (remove #ifdefs for it)
Files affected: common/readable.c include/spellist.h include/config.h
server/attack.c server/gods.c server/skills.c server/spell_effect.c
server/spell_util.c
doc/Makefile.in, doc/Protocol: Add protocol description file here instead
of in the client distribution.
include/global.h: Move declaration of MAX_EXP_CAT near top of file
so it is set before player.h is included.
include/newclient.h: Add CS_STAT_SKILL* values for sending skill
experience information to client.
include/newserver.h: Add skillexp value to socket struct which determines
if client wants skill experience informatiion.
include/player.h: Add skill information tracking to player structure
so we can easily know when to send updates to client.
random_maps/expand2x.c: remove unused variable to prevent compiler warnings.
random_maps/square_spiral.c: Include prototype information on all systems,
not just win32 to prevent compiler warnings.
server/skill_util.c: Initialize skill pointers to make it easier to
find skill information when we want to update client.
socket/init.c: Init socket->skillexp to 0.
socket/loop.c: Fix indentation of table - whitespace change only
socket/metaserver.c: Minor fix to prevent compile warnings (on the sprintf
that composes the data to send to the metaserver)
socket/request.c: Redo SetUp function to be more compact and IMO simpler as
wll as easier to read (functionality remains the same).
VersionCmd modified to warn users of on dxclients (code on MT)
StatsCmd added to send skill information if client wants it.
The sending of skill experience is by MT, rest of the changes by me.
MSW 2001-05-28
Show difference between Revision 1.52 and 1.53
Revision 1.52mwedel 2001/05/24 15:42:52 +2 -2
server/spell_util.c: Fix typo in polymorph code (when enabled in config.h)
MSW 2001-05-24
Show difference between Revision 1.51 and 1.52
Revision 1.51mwedel 2001/05/11 23:04:19 +11 -2
include/config.h: Add NO_POLYMORPH feature selection
include/spellist.h: If NO_POLYMORPH is set, make it so that polymorph will
not show up in wands/rods
server/spell_util.c: Handling for NO_POLYMORPH selection
MSW 2001-05-11
Show difference between Revision 1.50 and 1.51
Revision 1.50mardahl 2001/05/11 19:10:11 +2 -2
Disabled polymorph, for now.
We'll revisit it and fix it after 1.0.

PeterM
Show difference between Revision 1.49 and 1.50
Revision 1.49mwedel 2001/04/26 01:10:50 +3 -1
server/spell_util.c: have put_a_monster generate random monster
abilities.
TODO, doc/mapguide: Various minor updates.
MSW 2001-04-25
Show difference between Revision 1.48 and 1.49
Revision 1.48mardahl 2001/04/24 23:58:27 +3 -3
Protect people from golems.
Show difference between Revision 1.47 and 1.48
Revision 1.47mardahl 2001/04/23 15:03:29 +2 -2
Maybe a more sensible way to stop non-players from casting rune of
marking.
Show difference between Revision 1.46 and 1.47
Revision 1.46mardahl 2001/04/18 16:04:34 +4 -2
Prevent monsters from casting marking rune.
Show difference between Revision 1.45 and 1.46
Revision 1.45mardahl 2001/04/07 01:04:24 +7 -7
This hack prevents burnouts and firetrails from stacking themselves
many deep. I've noted a huge reduction in the number of objects
to be processed from this mod alone, in situatons where a lot
of comets are flying.

PeterM
Show difference between Revision 1.44 and 1.45
Revision 1.44mwedel 2001/02/23 00:06:35 +2 -2
MSW 2001/02/22:
TODO: Add some items, remove some others, remove outline of future versions,
since it was out of date.
common/loader.l,loader.c: Declare msgbuf a static outside the lex_load function.
lex_load was otherwise clearing it each time it was called, which resulted
in empty messages for the random artifacts (since the call lex_load one
line at a time). Instead, we just zero this at start of load_object.
Original reason of this change was due to purify errors - as I look at the
code, it appears even before these changes that it was clearing the buffer
properly.
common/map.c: removing pending field from map objects.
common/re-cmp.c: Comment out some code which was resulting in too many
false compares.
include/config.h: increase default for MAX_OBJECTS. 6000 is a bit small
on current systems.
include/map.h: Remove pending field from map structure.
random_maps/treasure.c: Increase size of doorlist. Fixes crash, in that
if a random map could place 8 doors around the treasure, the list
was not terminated, so the problem would eventually try to read/dereference
random memory after the array.
server/c_misc.c: Remove pending field from maps, so remove functions
and other places that referred to it (like the maps command)
server/c_wiz.c: fix up wiz map reset command. Not really tested, but
old code had some definate problems just from visual inspection.
server/main.c: Further fix for unique exits - relative paths to unique maps
from non unique maps should now work.
server/monster.c: Various fixes - one is that should get more reliable distance
values for multipart monsters. Second, modify dist_att to calculate from
closest part of monster, and not the head of the monster.
server/pets.c: Remove code dealing with pending objects.
server/player.c: Don't remove invisible objects in players inventory when
playing with permadeath mode.
server/spell_util.c: If you try to cast denied spell, it no longer costs any
spellpoints.
socket/item.c: Fix bug where it was using 'item' protocol command instead of
'item1'
End of MSW 2001/02/22 checkin.
Show difference between Revision 1.43 and 1.44
Revision 1.43avogl 2001/01/25 18:59:09 +16 -10
spell_effect.c:

Modified polymorph spell:
It will no longer bring up items that are
either value=0 or startequip 1.
This shall prevent polymorph handing out the
gods' relicts.

spell_util.c

Modified ball lightning/divine shock:
When this spell is casted by a player,
it will hunt monsters/generators only
(just like it used to).
But when the spell is casted by non-player
(monster/firewall/rune), it will track
players only. This will re-enable
ball lightnings as anti-player weapon in
certain maps.
Show difference between Revision 1.42 and 1.43
Revision 1.42peterm 2001/01/10 22:53:17 +2 -1
Implemented Wrathful Eye and gave it to Valriel.
Show difference between Revision 1.41 and 1.42
Revision 1.41cvs 2000/12/23 19:12:44 +54 -29
MSW 2000/12/23:
server/attack.c: Don't exit hit_player function if damage is reduced to 0
in magical attacks. This was preventing face of death and probably a lot
of effect only spells from working.
server/spell_util.c: modify check_cone_push to use move_object to blow
the objects. Before, multisquare monsters were getting sliced
into their individual components - move_object deals with multisquare objects
properly.
Show difference between Revision 1.40 and 1.41
Revision 1.40cvs 2000/12/18 01:38:25 +2 -11
MSW 2000/12/17: Various changes. Note that the scope of files in this checkin
make it appear that a lot was changed, but in fact it was mostly just
re-orginization - very little code has actually changed.
include/autoconf.h.in: Add HAVE_LIBDES to file.
include/config.h: Remove comments after defines for MAP_MIN/MAX timeouts.
This just removes some warnings during compile. comments are now
on lines by themselves.
include/player.h: remove shootstrength for player structure. It was unused.
server/Makefile.in: remove input.c file, add c_range.c file.
server/c_chat.c: remove command_last, add command_shout and command_tell
from input.c to this file. Also fix bug in command tell which
would let players crash server at will.
server/c_misc.c,server/c_object.c: Relocate many functions
from input.c into these files.
server/c_move.c, server/c_new.c: Add standard crossfire banner comment.
server/c_range.c: New file - contains range related commands,
including spell casting (relocated from input.c)
server/c_wiz.c: move command_invisible from input.c into this file.
server/commands.c: Remove unused commands (bell, last, strength)
server/input.c: removed file.
server/main.c: Change HAVE_DES_H to HAVE_LIBDES
server/player.c: When choosing a race, draw it facing south for best
presentation of image.
server/spell_util.c: Remove dead code (#if 0 shootstrength related
code)
socket/loop.c: remove unused variables.
NOTE: Due to the addition/removal of files, you will need to do
'config.status; make depend; make' from the top level directory for
everything to be compiled properly.
End of MSW 2000/12/17 checkin.
Show difference between Revision 1.39 and 1.40
Revision 1.39peterm 2000/12/15 20:44:58 +2 -2
Improved tracking for poison fog.
Show difference between Revision 1.38 and 1.39
Revision 1.38peterm 2000/12/15 20:34:34 +79 -76
Initial implementation of poison cloud.
Show difference between Revision 1.37 and 1.38
Revision 1.37avogl 2000/12/15 09:42:36 +15 -7
server/attack.c:

Acid will only corrode equipment while the player has
less than 50% acid resist.
Note that acid corrosion makes players feel *very* unappy
since there is no way to reverse the process yet.

Outcommented the deathstrike-debug message. It used to
spam the log like crazy.

server/spell_util.c:
server/time.c:

Patch for spell/missile reflecting:
The "reflect spell/missile" flag does no longer provide
living creatures with perfect immunity to projectiles.
There is a missing chance of: 10% + level of projectile / 10
This does apply for all kinds of magic bullets/missiles,
arrows, bolts and thrown objects.
Smite spells and bolt spells are not affected, they will
always bounce off.

server/spell_effect.c:

Done some more cleaning and adjusting for the protection
spells. E.g. it is no longer possible to have both a god's
blessing and a holy possession in effect.
Also removed is the ability to add holy bless/poss. effects
of more than one god to a char.
Show difference between Revision 1.36 and 1.37
Revision 1.36peterm 2000/12/09 16:39:04 +2 -2
Activated the vitriol splash spell, which was previously
inactivated.
Show difference between Revision 1.35 and 1.36
Revision 1.35cvs 2000/12/03 18:40:05 +13 -24
Checking for partial resistance code. Various minor errors also fixed
(compiler warnings, unused variables, Makefile.in changes, etc).
PR code also includes support to send protections to the client.
Show difference between Revision 1.34 and 1.35
Revision 1.34peterm 2000/11/23 18:48:56 +3 -1
Found a bug where splints would hit something and then be
freed, and then another free/remove attempt would crash the
server.

I'm uncertain of the original cause of this bug.
Show difference between Revision 1.33 and 1.34
Revision 1.33peterm 2000/11/21 12:58:34 +2 -1
Repaired the poison cloud spell.
Show difference between Revision 1.32 and 1.33
Revision 1.32peterm 2000/11/19 18:59:16 +50 -20
New spells added:

conflict
vitriol
ironwood skin.
Show difference between Revision 1.31 and 1.32
Revision 1.31peterm 2000/11/19 01:33:30 +26 -4
PeterM: Implementation of:
1) sanctuary
2) holy rage
3) peace
4) forked lightning
5) flaming aura
6) spiderweb
Show difference between Revision 1.30 and 1.31
Revision 1.30peterm 2000/11/18 17:19:31 +2 -1
PeterM: some repairs to sanctuary and flaming aura.
Show difference between Revision 1.29 and 1.30
Revision 1.29peterm 2000/11/17 21:32:34 +23 -1
10 new spells skeleton added to spellist.h and spells.h:
SP_SANCTUARY, SP_PEACE, SP_SPIDERWEB SP_CONFLICT, SP_RAGE,
SP_FORKED_LIGHTING SP_POISON_FOG, SP_FLAME_AURA,
SP_VITRIOL

Of these, SP_SANCTUARY and SP_FLAME_AURA are partially
implemented. These two require archetypes yet.
Show difference between Revision 1.28 and 1.29
Revision 1.28peterm 2000/11/17 05:16:45 +45 -1
New spell added, Windstorm.
It pushes objects, mostly, and does a little damage.
define.h: NROFREALSPELLS++
spellist.h spells.h: "windstorm"
archetypes: new arch added for windstorm
disease.c: comment on new title parameter.
spell_effect.c, sproto.h spell*.c: implmenetation of windstorm.
Show difference between Revision 1.27 and 1.28
Revision 1.27peterm 2000/11/14 20:57:10 +50 -1
PeterM: Forked lightnig code committed.
not activated yet though: requires parameters set in the archetype.
Show difference between Revision 1.26 and 1.27
Revision 1.26peterm 2000/11/06 18:43:30 +37 -34
Fix of crash and improvement to move_ball_lightning. --PeterM
Show difference between Revision 1.25 and 1.26
Revision 1.25jec 2000/11/06 17:06:47 +113 -120
* stop_item() / attack fix patch 2000-11-06
Show difference between Revision 1.24 and 1.25
Revision 1.24peterm 2000/10/31 16:11:46 +9 -9
Make sure ball lightning is IN the map before we hit
things with it. Bugfix on advice from jec.
Show difference between Revision 1.23 and 1.24
Revision 1.23peterm 2000/10/31 05:43:07 +38 -32
Another fine-tuning of the ball lightning tracking. Ball lightning
can randomly solve "my direct path is blocked" problems.
Show difference between Revision 1.22 and 1.23
Revision 1.22peterm 2000/10/30 22:53:21 +133 -12
PeterM:
some mods to ball lightning:
1) MUCH better target tracking
2) Hits neighboring squares at 1/2 damage

Divine shock spell added. Like ball lightning except
has AT_GODPOWER.
Show difference between Revision 1.21 and 1.22
Revision 1.21peterm 2000/10/20 14:39:47 +18 -11
Moderated summoned creatures power for monsters. Players and monsters
are unbalanced in HP: a player cannot cope with a fast, high-wc, high
dam monster nearly so well as a monster with 32000hp.
Show difference between Revision 1.20 and 1.21
Revision 1.20peterm 2000/10/20 03:11:33 +2 -2
Added CAUSE_COLD to spell_util.
Show difference between Revision 1.19 and 1.20
Revision 1.19peterm 2000/10/20 01:34:02 +7 -4
Fixed some bugs with summoned creatures speed.
Show difference between Revision 1.18 and 1.19
Revision 1.18peterm 2000/10/16 14:19:31 +9 -3
Major race/class change by PeterM:
BEGIN:
*****************
apply.c: new function, apply changes to player. If the change is a CLASS,
player receives certain attributes from the class.

login.c: make sure people using the old race/class archetypes in their
player files can still use them.

player.c:
1) give_initial_items modified for greater flexibility: you
can pass in a treasurelist.
2) Also, initial forces are applied to the player.
3) Comment added on the stat roll function.
4) Word of recall into the new class-choice map (unfortunately hard-wired.) for newly-rolled players.
5) gen_sp and gen_hp and gen_grace now allowed to go negative to slow down player
regen.

skill_util.c
1) Don't give out basic skills anymore. This interferes with the class code.

spell_util.c
1) Praying failures moderated in frequency.
2) Summoned creatures enhanced in wc, speed, depending on casting level.
3) Word of recall allowed to work in no-magic areas if a flag is set.

time.c
1) Move player changer function added.
2) Marker object expiration added.

END race/class stuff 10/16/2000
***************************
Show difference between Revision 1.17 and 1.18
Revision 1.17jec 2000/06/13 08:30:03 +34 -12
server/spell_util.c: move_swarm_spell(): Improved distribution of
fired objects. Fixed starting position of fired objects to be able to
hit targets immediately in front the caster. - Patch by Jeffrey Hantin.
Show difference between Revision 1.16 and 1.17
Revision 1.16jec 2000/06/08 11:08:42 +31 -24
common/button.c: do_mood_floor(): Bugfixes: Only players can have pets.
Call add_friendly_object() for friendly monsters.

server/spell_effect.c and server/spell_util.c: Several functions: Only
add a pet if there really is a pet's owner, and it's a player.

server/spell_effect.c: cast_charm() and cast_charm_undead(): Bugfixes:
Only players can cast these spells. This fixes server crash if
a monster casted a charm spell, and the charmed pet was killed.
Call add_friendly_object for friendly monsters.

common/friend.c: remove_friendly_object(): Use llevError for error
messages.

common/living.c: fix_player(); server/gods.c: tailor_god_spell();
server/spell_effect.c: summon_avatar() and animate_weapon(): Bugfix: Set
a string to NULL after calling free_string(). This fixes a nasty bug
that caused the string's reference count drop below 0, which resulted
in corruption of malloc()'s internal data structures (and possibly
server crashes).

server/time.c: move_creator(): Bugfix: Call free_string() to free old
values of op->name and op->title before overwriting them with new values.

common/object.c: insert_ob_in_map_simple() and insert_ob_in_map():
Check that we don't insert freed objects.

server/attack.c: hit_player_attacktype() and hit_player(): Bugfix: Check
that find_god() really found a god, and that 'god->slaying' is not NULL.
Fixes crash if a monster casted turn undead and actually hit something.

server/attack.c: hit_player(): Check that a pet's owner is a player.
Prevents server crashes if a monster has a pet monster due to a bug
somewhere. Use llevError for error message.

server/time.c: move_arrow(): Use llevDebug level for "Arrow had no
map" message.

server/c_object.c, server/spell_effect.c, server/spell_util.c: Bugfixes:
Added some missing checks for destroyed objects. Use was_destroyed()
or return value of insert_ob_in_map() to check for destroyed objects,
not FLAG_FREED or FLAG_REMOVED. Don't use op->count of destroyed objects.

server/shop.c: get_payment2(): Type of tag is 'tag_t', not 'long'.

server/spell_effect.c: animate_bomb(): Fix environment checks.

server/spell_util.c: fire_bolt(): Bugfix: Set level of bolt.

server/spell_util.c: explosion(): Bugfix: Set FLAG_NO_APPLY before
moving the exploding object to the top.

server/spell_util.c: put_a_monster(): First create the monster
completely, then just insert its head.

server/time.c: generate_monster(): Bugfix: Don't free generators that
are used up in this function. process_object() already does this.
This fixes steambolt (which is a generator but must not used up here -
generate_monster() wasn't looking at FLAG_IS_USED_UP) and all generators
which should really be used up (because process_object() didn't expect
generate_monster() to destroy the object).
Show difference between Revision 1.15 and 1.16
Revision 1.15jec 2000/05/29 11:31:26 +16 -7
lib/checkarch.pl: Check for archetypes with type FIRECHEST but no level.
- Jan Echternach 5/29/2000

server/apply.c: move_apply(): Added handling of THROWN_OBJ, CANCELLATION
and BALL_LIGHTNING.
server/spell_effect.c: cancellation(): Traverse inventory of objects
with type THROWN_OBJ.
- Jan Echternach 5/29/2000

server/player.c: fire_bow() and server_skills.c: do_throw(): Bugfix: Don't
use op->count of freed objects. Use was_destroyed() to check for freed
objects instead of QUERY_FLAG (FLAG_FREED). - Jan Echternach 5/29/2000

server/spell_util.c: fire_a_ball(): Bugfixes: Use op->other_arch as
the archetype to fire, not FBULLET. (-> Firechests now cast fire balls
again, not snowballs.) Set level of fired archetype. Check if object
was destroyed after insert_ob_in_map(). - Jan Echternach 5/29/2000

server/time.c: move_firewall() and move_firechest(): Do nothing if
object has no map. Fixes server crashes if a dm creates such a thing
in the inventory. - Jan Echternach 5/29/2000
Show difference between Revision 1.14 and 1.15
Revision 1.14jec 2000/05/26 07:36:49 +32 -9
* server/attack.c: hit_map(), hit_player(); server/spell_effect.c:
move_cone(); server/rune.c: spring_trap(); server/spell_util.c:
move_missile(): Bugfix: Added missing was_destroyed() calls.
* server/rune.c: spring_trap(): Bugfix: Call trap_show() before the rune
has a chance to be destroyed.
* server/attack.c: hit_map(), hit_player(): Check for freed objects
right at the beginning of the function. Removed check that hitter has
a name from hit_player().
* server/spell_util.c: move_cone(): Bugfix: Remove cone objects in
inventories from active list, this fixes the cone without map problem when
a flower was hit with ice and put into an icecube.
* server/spell_util.c: move_missile(): Bugfix: Don't call hit_map() while
missile is removed from the map.
* server/apply.c: manual_apply(): Handle MMISSILE.
Show difference between Revision 1.13 and 1.14
Revision 1.13jec 2000/05/26 06:05:45 +2 -1
* server/spell_effect.c: animate_weapon() and server/spell_util.c:
summon_monster(): Bugfix: Set FLAG_FRIENDLY for friendly objects.
Show difference between Revision 1.12 and 1.13
Revision 1.12jec 2000/05/26 04:50:49 +35 -32
* apply() cleanup patch 26/5/2000
Show difference between Revision 1.11 and 1.12
Revision 1.11jec 2000/05/22 08:06:15 +19 -17
common/object.c: Splitted set_owner() into set_owner_simple() and
set_owner. copy_owner(): New function.
server/spell_util.c: explode_object(): Use copy_owner() instead of setting
skill and experience objects manually. Bugfix: Don't use op->owner
directly (fixed by using the caster in call to SP_level_dam_adjust(),
not the owner, which was wrong anyway).
server/spell_util.c: fire_arch_from_position(): Use copy_owner() instead
of set_owner() if 'op' isn't the real owner but only a spell object
owned by somebody else.
server/spell_util.c: move_swarm_spell(): Use the swarm spell object as
the owner in call to fire_arch_from_position(), which now handles this
case correctly.
server/spell_util.c: fire_swarm(): Call tailor_god_spell().
server/gods.c: determine_god(): op->type==SWARM_SPELL is a spell.
server/gods.c: tailor_god_spell(): op->type==SWARM_SPELL is a spell.
Always abort function if we couldn't find a god. Always add god's
attacktype if the spellop's attacktype has AT_GODPOWER.
Show difference between Revision 1.10 and 1.11
Revision 1.10cvs 2000/04/24 23:53:00 +83 -69
server/spell_util.c: Fix move_golem so that multi square avatars (golems)
don't hit themselves. Remove will_hit_self function (only used in
move_golem), since it did not work. Change structure & indenting of
move_golem function so it isn't quite so nested - functionality
remains the same. When we do find something to kill in move_golem,
call attack_ob against it instead of hit_map - hit_map is not save
for multi object hitters. MSW 4/24/2000
Show difference between Revision 1.9 and 1.10
Revision 1.9jec 2000/04/19 06:46:42 +2 -2
See CHANGES file.
Show difference between Revision 1.8 and 1.9
Revision 1.8jec 2000/04/17 09:18:13 +54 -49
See CHANGES file.
Show difference between Revision 1.7 and 1.8
Revision 1.7cvs 2000/04/13 23:48:19 +2 -2
Cosmetic fixes - updates to rcsid string to include right file name
as well as updates to mail address and/or additions to top banner.
Mark Wedel 4/13/2000
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/04/04 23:43:26 +40 -24
server/spell_util.c:
New argument of fire_swarm() to specify whether it's a magic attack.
All swarm spells except meteor swarm are now magic (just as the
underlying basic spell).

New function fire_arch_from_position() which doesn't use the owner's
position as the starting position of the fired arch.

move_swarm_spell(): Correctly set owner and magic in call to
fire_arch_from_position().

(-> "cause many wounds" is working now)
Patch by Jan Echternach, applied & checked in by Mark Wedel, 4/4/2000
Show difference between Revision 1.5 and 1.6
Revision 1.5damn 1999/09/18 02:08:32 +2 -2
Adjusted notification text for expired snake/staff. -- DAMN
Show difference between Revision 1.4 and 1.5
Revision 1.4damn 1999/09/17 14:18:34 +40 -18
- Staff to Snake, Dancing Sword, and Animate Weapon spells now all use
animate_weapon function
- holy golems avoid damaging their owners
- raw mana spells --DAMN
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 1999/08/06 16:29:54 +12 -9
patches from DAMN for various things:

This one makes a couple things level dependent that used to be fixed:
1) time it takes Word of Recall to take effect
2) amount of energy transferred by Transferrence spell
3) percentage of energy drained by Magic Drain spell

Also, the following effects have been modified:
1) Followers of a cult that considers undead enemies have a penalty to
Command Undead.
2) Magic Drain gives back to the caster a small portion of the energy
drained from the victim.

And a bug was fixed:
1) SP_level_dam_adjust used and SP_level_strength_adjust used the
player's level, where they should have used the caster's level.
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/07/13 01:03:04 +0 -0

Global commit for 0.95.4 - most files have no changes but just have
differing headers between my local RCS and the CVS versions and need to
get synced up.
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:04 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:04 +0 -0
First CVS revsion: crossfire-0.95.3
Show difference between Revision 1.1 and 1.1.1.1
Revision 1.51.2.1mwedel 2001/05/24 15:44:32 +2 -2
server/spell_util.c: Fix typo in polymorph code (when enabled in config.h)
MSW 2001-05-24
Show difference between Revision 1.51 and 1.51.2.1


File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:51