--- crossfire/server ---


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

Filename: rune.c
Revision 1.49mwedel 2006/06/29 01:09:23 +11 -5
server/rune.c: Undo last patch - breaks summoning runes.
server/skills.c: Change disarm logic - after first failure, don't continue
to disarm traps (makes sense anyways - can really only disarm one thing
at a time) - this fixes the problem that last change to rune.c tried
to fix.
MSW 2006-06-27
Show difference between Revision 1.48 and 1.49
Revision 1.48mwedel 2006/06/26 02:31:00 +7 -11
server/rune.c: Patch from schmorp - when dealing with traps, don't put them
underneath the player when a disarm failure happens, instead, update the
direction to hit the player - prevents a recursion problems causing
hundreds of objects.
MSW 2006-06-25
Show difference between Revision 1.47 and 1.48
Revision 1.47ryo_saeba 2006/05/05 04:26:35 +2 -2
First part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.46 and 1.47
Revision 1.46tchize 2006/04/06 16:18:36 +3 -3

finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other
Show difference between Revision 1.45 and 1.46
Revision 1.45akirschbaum 2005/11/01 04:08:17 +2 -2
Add new function object_get_env_recursive() to find the outermost environment
object for a given object.
Show difference between Revision 1.44 and 1.45
Revision 1.44akirschbaum 2005/10/07 14:38:50 +3 -3
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.43 and 1.44
Revision 1.43akirschbaum 2005/08/25 15:44:16 +2 -1
server/rune.c: Fix crash if casting disarm out of map bounds.
server/spell_effect.c: Fix crash if casting polymorph out of map bounds.
Show difference between Revision 1.42 and 1.43
Revision 1.42ryo_saeba 2005/08/12 03:18:59 +2 -2
Use const char* instead of char* when possible
Show difference between Revision 1.41 and 1.42
Revision 1.41akirschbaum 2005/07/16 16:10:39 +2 -2
Fix spelling errors in string constants.
Show difference between Revision 1.40 and 1.41
Revision 1.40akirschbaum 2005/05/20 14:28:02 +2 -2
Ensure that object->msg always has a trailing \n character. This is necessary
to prevent corrupted map files.
Show difference between Revision 1.39 and 1.40
Revision 1.39akirschbaum 2004/09/14 14:59:08 +21 -13
server/rune.c: Prevent creation of level 0 runes. Re-enable runes to cast
multiple spells.
Show difference between Revision 1.38 and 1.39
Revision 1.38mwedel 2004/06/18 02:45:29 +2 -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.37 and 1.38
Revision 1.37mwedel 2004/03/23 01:52:31 +2 -3
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.36 and 1.37
Revision 1.36mwedel 2003/11/30 23:45:18 +11 -1
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.35 and 1.36
Revision 1.35mwedel 2003/09/13 00:02:12 +208 -255
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.34 and 1.35
Revision 1.34temitchell 2003/09/04 01:25:32 +9 -6
- add new type TRAP, make initial seperations from RUNE in code
add in traps triggering stuff if they are detonated
Show difference between Revision 1.33 and 1.34
Revision 1.33tchize 2003/09/03 07:25:06 +2 -2

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.32 and 1.33
Revision 1.32tchize 2003/09/01 09:31:16 +6 -4

Rune patch submitted by Ryo. Show name of runes when disarming (fails and success)
Show difference between Revision 1.31 and 1.32
Revision 1.31mwedel 2003/03/07 01:33:14 +2 -1
Various bug fixes.
crossedit/Attr.c: Minor cleanup to eliminate some compile time warnings.
plugin/plugin_python.c: Remove some unused variables, thus fixing up some
compiler warnings.
random_maps/random_map.c, random_maps/random_map.h, random_maps/special.c:
Add MIN_RANDOM_MAP_SIZE values instead of hardcode constants.
server/monster.c: Fix communicate - odd bug can be map gets swapped out
just after player is transferred to another map, causing crashes as
map that was originally spoken on is no longer in memory.
server/rune.c: add missing free_object call when erasing runes.
server/skills.c: Change write_on_item to determine type of writing based
on content of mesage, or lack thereof, and not the marked object.
Fix problem of buf not being initalized.
MSW 2003-03-06
Show difference between Revision 1.30 and 1.31
Revision 1.30mwedel 2003/02/16 01:30:09 +51 -24
server/rune.c: Modify dispel_rune function (called from disarm spell)
to erase marking runes. While at it, fix it so that it does the right
thing with respect to tiled maps.
MSW 2003-02-17
Show difference between Revision 1.29 and 1.30
Revision 1.29garbled 2003/02/04 00:26:07 +2 -2
Fix some bugs for once, rather than introduce them.
Show difference between Revision 1.28 and 1.29
Revision 1.28mwedel 2003/01/08 02:39:20 +9 -7
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.27 and 1.28
Revision 1.27garbled 2002/11/12 18:49:47 +4 -4
#ifdef CASTING_TIME -> settings.casting_time
Show difference between Revision 1.26 and 1.27
Revision 1.26mwedel 2002/07/25 01:57:14 +36 -1
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.25 and 1.26
Revision 1.25mwedel 2002/07/14 23:25:40 +3 -3
Update banner copyright with proper contact information.
MSW 2002-07-14
Show difference between Revision 1.24 and 1.25
Revision 1.24mwedel 2002/06/27 01:28:00 +7 -1
server/rune.c: Fix bug that allowed players to use marking runes to create
arbitrary objects by embedding a endmsg in the string.
MSW 2002-06-26
Show difference between Revision 1.23 and 1.24
Revision 1.23michtoen 2001/10/29 20:30:20 +1 -1
Remove a bug, reset some modules
Show difference between Revision 1.22 and 1.23
Revision 1.22michtoen 2001/10/29 18:49:03 +2 -2
really SOME fixes - most casting
Show difference between Revision 1.21 and 1.22
Revision 1.21garbled 2001/10/15 16:12:08 +7 -6
Remove all instances of RANDOM()% and replace with rndm() from utils.c

garbled 2001-10-15
Show difference between Revision 1.20 and 1.21
Revision 1.20garbled 2001/09/26 16:34:08 +7 -8
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.19 and 1.20
Revision 1.19mwedel 2001/07/13 23:11:18 +5 -5
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.18 and 1.19
Revision 1.18mwedel 2001/05/28 23:41:54 +1 -17
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.17 and 1.18
Revision 1.17mwedel 2001/05/11 01:11:14 +12 -2
server/rune.c: Make sure rune message is newline terminated. Fix map
corruption problem. MSW 2001-05-10
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2001/05/10 01:58:15 +14 -15
write_rune: Modify to know longer use a relatively small dynamic buffer that may
not be large enough. MSW 2001-05-09
Show difference between Revision 1.15 and 1.16
Revision 1.15mardahl 2001/04/23 23:51:00 +3 -4
Fix of bug for empty message in rune.
Needed a \n terminator which wasn't there.
Mark identified the bug, I fixed it.

PeterM
Show difference between Revision 1.14 and 1.15
Revision 1.14mardahl 2001/04/23 14:59:41 +3 -2
Backed out a change which seemed harmless but which may have
been causing some bizarre side effect: conditional setting of
ownserhip of runes with no attack or spell.
Show difference between Revision 1.13 and 1.14
Revision 1.13mwedel 2001/04/20 19:31:11 +2 -2
Fix // comment that causes compile to fail on ANSI compliant compilers.
MSW 2001-04-20
Show difference between Revision 1.12 and 1.13
Revision 1.12mardahl 2001/04/16 02:12:24 +2 -2
Rune without magic or attack doesn't need to be owned
Show difference between Revision 1.11 and 1.12
Revision 1.11cvs 2000/12/27 01:53:35 +4 -4
MSW 2000/12/26:
Checkin of Jan's new god intervention code. I haven't played around with
it much, but I haven't seen any really obvious problems.
common/living.c: remove learn_prayer_chance
common/treasure.c: Various changes to treasure generation - mostly to
deal with starting equipment and putting it in the inventory.
doc/crossfire.doc: Update docs on god intervention.
include/define.h: GT_... flags removed.
include/treasure.h: GT_... flags added. Addition flags added from
what was in define.h before.
lib/archetypes, lib/crossfire.png, lib/treasures: Updated with new
archetypes and treasures.
random_maps/standalone.c,server/rune.c,server/time.c: Calls to
create_treasure updated
server/apply.c: New functions for god intervention added, update calls
to create_treasure, other god related changes.
server/c_wiz.c: Calls to create_treasure updated, various functions to
allow DM's to learn/unlearn spells added.
server/commands.c: Various commands added to the wiz set of commands.
See commen for c_wiz.c
server/disease.c: Changes to reduce_symptoms
server/gods.c: Numerous updates for god intervention code.
server/player.c: Modifications for starting player equipment.
server/skill_util.c: Display the god the character worships when they
issue the skills command.
server/skills.c: Minor cosmetic change made to message when praying on altar.
server/spell_effect.c: Changes related to gods, cure spells, and
generation of treasures & items.
End of MSW 2000/12/26 checkin.
Show difference between Revision 1.10 and 1.11
Revision 1.10cvs 2000/12/03 18:40:05 +1 -2
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.9 and 1.10
Revision 1.9jec 2000/11/06 17:06:47 +17 -4
* stop_item() / attack fix patch 2000-11-06
Show difference between Revision 1.8 and 1.9
Revision 1.8cvs 2000/06/08 19:17:22 +5 -4
Various improvements from jhantin@derringer.net:

* fixed reversed strstr() calls

* added a 'force' argument to infect_object(): if set, skip disease wc
roll

* pulled disease susceptibility checking out into its own function

* diseases in an immune carrier last forever

* diseased needles use infect_object() with the force flag set

* cast_cause_disease() sets the force flag so it always catches on the
first try

* NDI_UNIQUE on "You infect %s with %s!" only if you infect a player
Show difference between Revision 1.7 and 1.8
Revision 1.7jec 2000/06/07 18:46:18 +6 -4
server/rune.c: trap_disarm(): Bugfix: Use SK_level() to determine
disarmer's level. Fixes server crash if multisquare monster casts
"disarm".

server/attack.c: hit_map(): Use was_destroyed() to properly check for
destroyed next object. Use llevError for error messages. Skip all
objects that are (no longer) at the specified map position.
Show difference between Revision 1.6 and 1.7
Revision 1.6jec 2000/05/26 07:36:49 +23 -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.5 and 1.6
Revision 1.5jec 2000/05/26 04:50:49 +4 -9
* apply() cleanup patch 26/5/2000
Show difference between Revision 1.4 and 1.5
Revision 1.4jec 2000/05/15 15:57:45 +3 -1
See CHANGES file.
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 1999/08/22 18:39:51 +5 -6
Fix in server/rune.c - if the victim of a trap/rune is not on a map
and the object has a disease, it would crash the server. Temporary
fix put in to make sure there is a map, and if not, use a predefined
difficult of 1. I think the real issue is how can an object not on a map
be setting a trap (in this particular bug, reported by Klaus Elsbernd,
the victim was a thrown object) - msw
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


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