Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: treasure.c | |||
Revision 1.72 | qal21 | 2006/09/11 00:10:50 | +3 -3 |
Add MAX_SPELLITEM_LEVEL set to 110 and set MAXLEVEL to 115. | |||
Show difference between Revision 1.71 and 1.72 | |||
Revision 1.71 | qal21 | 2006/09/10 01:44:27 | +2 -2 |
Make fix_flesh_item only run when the donor is a monster. Fixes bug #1555569. | |||
Show difference between Revision 1.70 and 1.71 | |||
Revision 1.70 | lalo | 2006/09/09 11:07:49 | +7 -2 |
add exp and other_arch to flesh; more info about the original monster, to be used in spells or scripts | |||
Show difference between Revision 1.69 and 1.70 | |||
Revision 1.69 | ryo_saeba | 2006/08/26 12:56:21 | +1 -54 |
Remove obsolete event system. | |||
Show difference between Revision 1.68 and 1.69 | |||
Revision 1.68 | gros | 2006/07/21 05:17:29 | +296 -246 |
Added explicit item_power calculation for generated items that got an item_power of 0 - should solve bug #1460354 without creating new issues. gros - 2006/07/21 | |||
Show difference between Revision 1.67 and 1.68 | |||
Revision 1.67 | tchize | 2006/07/02 10:32:34 | +2 -2 |
more progress in unit testing, marked points of interrest in code | |||
Show difference between Revision 1.66 and 1.67 | |||
Revision 1.66 | akirschbaum | 2006/05/21 07:50:17 | +4 -4 |
Fix typo in parameter name. | |||
Show difference between Revision 1.65 and 1.66 | |||
Revision 1.65 | tchize | 2006/04/06 16:18:34 | +3 -3 |
finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other | |||
Show difference between Revision 1.64 and 1.65 | |||
Revision 1.64 | akirschbaum | 2006/02/08 18:48:36 | +3 -3 |
Apply patch #1427979 (code-cleanup: add const, fix warnings) by Stefan Huehner. | |||
Show difference between Revision 1.63 and 1.64 | |||
Revision 1.63 | akirschbaum | 2006/01/07 12:56:51 | +2 -2 |
Use named constants instead of numbers. | |||
Show difference between Revision 1.62 and 1.63 | |||
Revision 1.62 | akirschbaum | 2005/12/05 17:34:03 | +9 -9 |
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.61 and 1.62 | |||
Revision 1.61 | mwedel | 2005/11/16 02:16:00 | +2 -2 |
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.60 and 1.61 | |||
Revision 1.60 | cavesomething | 2005/10/04 20:01:05 | +3 -2 |
prevent crashyness on some broken treasure lists | |||
Show difference between Revision 1.59 and 1.60 | |||
Revision 1.59 | akirschbaum | 2005/09/04 11:58:12 | +2 -2 |
common/{anim.c, image.c, los.c, map.c, porting.c, treasure.c}, include/define.h, random_maps/treasure.c, server/{apply.c, c_misc.c, c_object.c, c_wiz.c, commands.c, daemon.c, hiscore.c, init.c, login.c, player.c, plugins.c, resurrection.c, weather.c}, socket/{init.c, item.c, loop.c, lowlevel.c}: Use LOG() for error messages and debug output instead of stdout/stderr. Include filename in error messages. server/resurrection.c: Fix error message in read_player(). | |||
Show difference between Revision 1.58 and 1.59 | |||
Revision 1.58 | ryo_saeba | 2005/08/12 08:46:34 | +3 -3 |
Fields changed from char* to const char*, cleanup. | |||
Show difference between Revision 1.57 and 1.58 | |||
Revision 1.57 | ryo_saeba | 2005/08/12 03:18:59 | +3 -3 |
Use const char* instead of char* when possible | |||
Show difference between Revision 1.56 and 1.57 | |||
Revision 1.56 | akirschbaum | 2005/07/16 16:10:37 | +2 -2 |
Fix spelling errors in string constants. | |||
Show difference between Revision 1.55 and 1.56 | |||
Revision 1.55 | ryo_saeba | 2005/07/15 08:51:49 | +5 -5 |
Glue cleaning. New plugin function. | |||
Show difference between Revision 1.54 and 1.55 | |||
Revision 1.54 | akirschbaum | 2005/07/14 04:18:54 | +2 -2 |
common/{button.c, treasure.c, utils.c}, server/{c_wiz.c, login.c, shop.c, skill_util.c, spell_effect.c}, socket/{image.c, item.c}: Fix printf like format specifiers. At least one of them fixes a means to crash the server. Andreas Kirschbaum 2005-07-14 | |||
Show difference between Revision 1.53 and 1.54 | |||
Revision 1.53 | mwedel | 2005/04/27 01:25:15 | +55 -38 |
Change to have objects generated by creator properly fixed up (material, for potions, spell object, etc). --- common/treasure.c: add GT_MINIMAL flag to change_treasure() to do minimal processing for objects created. include/treasure.h: Add GT_MINIMAL define. server/apply.c: Add call to fix_generated_item() in convert_item() MSW 2005-04-27 | |||
Show difference between Revision 1.52 and 1.53 | |||
Revision 1.52 | ryo_saeba | 2005/04/16 17:05:09 | +2 -2 |
Use const char* instead of char* in function parameters | |||
Show difference between Revision 1.51 and 1.52 | |||
Revision 1.51 | akirschbaum | 2005/03/06 14:38:52 | +2 -2 |
common/{map.c, readable.c, treasure.c}, crossedit/Attr.c, server/{apply.c, attack.c, c_wiz.c, init.c, monster.c, pets.c, shop.c, skill_util.c, skills.c, spell_attack.c, spell_effect.c, time.c}, socket/{info.c, request.c}: Add missing newline character to LOG() messages. | |||
Show difference between Revision 1.50 and 1.51 | |||
Revision 1.50 | mwedel | 2004/10/18 01:54:35 | +3 -1 |
Fix some bugs I introduced in my last commit. common/map.c: Add back in call to sum_weight that got removed when removing the object checking code. common/treasure.c: Have fix_generated_item() blank out the randomitems field after it has created treasure. server/apply.c: Only clear randomitems after create_treasure() - don't presume it should get blanked out for other reasons - with change to treasure.c above, this should be more reliable and fix starting skill issue, as randomitems was getting blanked out for CLASS object. server/main.c: Change processing of players a little - found crash where autosave was called for a removed player (map had got swapped out) - don't do autosave logic if player is removed. Move the autosave code to after the players action, so that can just have a single check of removed status. MSW 2004-10-17 | |||
Show difference between Revision 1.49 and 1.50 | |||
Revision 1.49 | mwedel | 2004/05/09 03:03:57 | +2 -2 |
common/treasure.c: Change the loading of the artifacts file to actually calloc() the object - reset_object() doesn't clear all the values, like active_next, active_prev, so better to just do it there. server/main.c: Add code in process_events() that checks for removed objects - have seen occasional crashes caused by them. MSW 2004-05-08 | |||
Show difference between Revision 1.48 and 1.49 | |||
Revision 1.48 | mwedel | 2004/04/08 01:48:51 | +1712 -1699 |
common/item.c: If potion wasn't given a random spell, use the archetype name when it is identified. common/treasure.c: Fix potion codes so that healing and magic power potions get the proper spell inserted into them. Also fix line termination issue. server/skill_util.c: Add check in skill_attack() to make sure current_weapon is not null - there has been some crashes here, but I can't figure out how it gets to this state, so better to at least handle it. MSW 2004-04-07 | |||
Show difference between Revision 1.47 and 1.48 | |||
Revision 1.47 | ryo_saeba | 2004/03/12 13:21:22 | +1699 -1696 |
Patch to enable multiple 'allowed' lines in artifacts | |||
Show difference between Revision 1.46 and 1.47 | |||
Revision 1.46 | temitchell | 2004/03/02 19:17:09 | +3 -4 |
- change buffer used for artifact item Allowed lists | |||
Show difference between Revision 1.45 and 1.46 | |||
Revision 1.45 | mwedel | 2004/02/09 02:04:24 | +21 -2 |
common/treasure.c: add_abilities(): For potions and horns (spell casting objects) convert the other_arch into a spell and put into the object - otherwise, the spell casting object casts the wrong spell. MSW 2004-02-08 | |||
Show difference between Revision 1.44 and 1.45 | |||
Revision 1.44 | mwedel | 2004/02/08 23:36:12 | +7 -2 |
common/object.c: Clean up formatting of copy_object. Only real code change is to fix events - copied event data wasn't getting malloc'd, and thus when another object of that event was freed, it freed the event data for all objects derived from it. common/treasure.c: Fix fix_generated_item() so that books generated by monsters with no_pick set don't inherit that for the book itself. Still do it for other objects of the creator type. MSW 2004-02-08 | |||
Show difference between Revision 1.43 and 1.44 | |||
Revision 1.43 | mwedel | 2004/01/25 00:51:22 | +2 -1 |
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.42 and 1.43 | |||
Revision 1.42 | mwedel | 2003/11/01 23:18:02 | +8 -4 |
common/treasure.c, doc/Developers/spells: Fix generation of rods so they have enough charges to cast the spells. Update documentation on what maxhp for the archetype of rods means. MSW 2003-11-01 | |||
Show difference between Revision 1.41 and 1.42 | |||
Revision 1.41 | mwedel | 2003/09/15 23:21:02 | +3 -2 |
More fix for artifact script events. Remove hardcode entry for number of events, and update problem with event->type not being set, causing crashes when it goes to save the object. MSW 2003-09-15 | |||
Show difference between Revision 1.40 and 1.41 | |||
Revision 1.40 | mwedel | 2003/09/15 01:12:49 | +4 -2 |
Fix same bugs as fixed in rel-1-5-0-patch. common/living.c, server/login.c: Fix crashes when dragon player inventory is completely wiped out. That in itself shouldn't happen, but we still shouldn't crash. Problem is missing skin and ability forces. MSW 2003-09-14 common/treasure.c Fix problem with the even structure not fully being initiliazed, resulting in crashes for artifacts that have events (eg, occidental mages item). MSW 2003-09-14 | |||
Show difference between Revision 1.39 and 1.40 | |||
Revision 1.39 | mwedel | 2003/09/13 00:01:30 | +436 -448 |
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.38 and 1.39 | |||
Revision 1.38 | temitchell | 2003/09/04 01:25:32 | +5 -1 |
- 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.37 and 1.38 | |||
Revision 1.37 | gros | 2003/06/30 15:51:37 | +17 -2 |
Corrected a bug involving assignation to an uninitialized pointer in the new event code - Gros 30/06/03 | |||
Show difference between Revision 1.36 and 1.37 | |||
Revision 1.36 | gros | 2003/06/26 06:27:43 | +38 -13 |
Re-implemented the event hooks in objects as a dynamically linked list, instead of a static table. | |||
Show difference between Revision 1.35 and 1.36 | |||
Revision 1.35 | garbled | 2003/02/13 23:50:29 | +2 -2 |
Lots of updates here: common/item.c: make item_power stop showing up in ring short descriptions. fix some of the items that were double-displaying materialnames, like mithril mithril chainmail. common/loader.l: add tooltype common/utils.c: Unless the object is armour or weapons, pick the first materialname we find. Now, newly generated diamonds will stack. Fix name_to_material to return NULL if it finds nothing, fixes navar_city/museum crash. Change set_materialname to take a materialtype_t argument, allowing functions to manually set the materialname, rather than let the randomizer pick for them. include/define.h: Add TOOL and BUILDFAC for item building. include/object.h: add tooltype for item building. include/materials.h: add M_SPECIAL. Set this in an object, to prevent things like mithril mithril chainmail. This is primarily only needed in artifacts, because they change the base material of the arch. Also useful in things like the demonspawn shield, and on maps. lib/artifacts: sprinkle M_SPECIAL around. server/player.c: remove auto_heal. This never should have been committed, and was never referenced by any code. server/c_object.c: add item building, but add it disabled. Too many bugfixes were tied in with this code to cleanly add them. When enabled, this code will add player item building, similar to create to take place. Requires a host of graphics and arches to be useable. | |||
Show difference between Revision 1.34 and 1.35 | |||
Revision 1.34 | garbled | 2003/02/04 00:26:07 | +6 -3 |
Fix some bugs for once, rather than introduce them. | |||
Show difference between Revision 1.33 and 1.34 | |||
Revision 1.33 | garbled | 2003/01/29 18:20:23 | +4 -1 |
Allow artifact file to set materialname. Sprinke materialnames on some of the obvious artifacts. | |||
Show difference between Revision 1.32 and 1.33 | |||
Revision 1.32 | garbled | 2003/01/29 18:07:08 | +6 -2 |
New materialtype system for crossfire. Based in concept on my original design, but rewritten from scratch to make it easily extensible. In a nutshell: Each of the old materialtypes (metal, glass, stone, wood) are now a class of materials. When an item in the game is created, if it does not have a specific materialname of it's own, a materialname is generated randomly from the matching entries in the "lib/materials" file. This file contains all of the saving throws, and other material specific modifications for each of the expanded materials. Materials can be manually specified in the arch with the "materialname" directive. Such as the gold coins, which are specified to be made of, you guessed it, gold. Saving throws have been slightly rewritten to use the new materialtypes, and a few other minor details associated with materialtypes have been patched up. Adding a new type of stone or wood, is as simple as adding a new entry in the lib/materials file. The game will automatically start distributing them around randomly. | |||
Show difference between Revision 1.31 and 1.32 | |||
Revision 1.31 | garbled | 2003/01/20 17:58:35 | +49 -18 |
Change the way wands rods and scrolls are created. Rather than randomly picking a level based on difficulty, the game now calculates a multiplier. This is the larger of either the levels/damage increase or levels/duration increase. If both of these are 0, we use 5. This does a number of things: 1) Rather than having 100 different possibilities for level of these items, there are 100/mult. Meaning that on average, more scrolls will stack. 2) A scroll of level 7 where the ldur was 5 is fundamentally equivilent to a level 5 scroll.. so just make them that way anyhow. 3) We now change the value of the item, based on these properties.. so a high level scroll will cost much more than a low level scroll. The cost increase is more, depending on how much more powerful the scroll is per level. In the very least.. scrolls should stack better now, and shop prices for them will make a wee bit more sense. | |||
Show difference between Revision 1.30 and 1.31 | |||
Revision 1.30 | mwedel | 2002/12/27 02:37:41 | +2 -2 |
common/treasure.c: Fix initialization of treasure structs to use calloc. server/player.c: Fix infinite loop. socket/loop.c: Make sure we put in null terminator for socket data. MSW 2002-12-26 | |||
Show difference between Revision 1.29 and 1.30 | |||
Revision 1.29 | mwedel | 2002/08/26 02:14:10 | +2 -5 |
Various bugfixes: common/map.c: Change so that same logic is used to determine pclose/fclose that is used to determine popen/fopen - otherwise, compressed map files probably don't work properly. common/treasure.c: Do a memset to make sure entire treasureslist is set to sane values. lib/archetypes: Fix 'slaying' field (which determines spell name) in god_spelldirect_face_of_death and god_spelldirect_finger_of_death server/apply.c: Fix infinite loop if the player had cursed items that needed to be unapplied to apply an item - setting up next item iteration was inside if check when it shouldn't be. Also, print message to player if this is the case. server/monster.c: Better format some of the code for improved readability. Fix indentation of can_see_enemy. Clean up invisiblity check - may have fixed a bug - old code should have worked, but wasn't very readable. server/move.c: Fix some bad code from last checkin - didn't fix the crash on no floor for door type, and instead removed check type from next line by accident. server/player.c: Remove call for init_beforeplay - this is already properly called, and re-calling it resulted in some things being redone when they shouldn't be. server/skills.c: Add message if there is nothing to steal form the monster. server/spell_effect.c: Improve message when invisiblity duration is maximized. socket/init.c: change O_NDELAY to O_NONBLOCK of fcntl. MSW 2002-08-25 | |||
Show difference between Revision 1.28 and 1.29 | |||
Revision 1.28 | mwedel | 2002/07/14 23:57:12 | +252 -217 |
-- 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.27 and 1.28 | |||
Revision 1.27 | mwedel | 2002/06/09 02:59:30 | +12 -8 |
More minor changes, including a fix for the disappearing object bug - this was caused by the flag_links not getting updated the last time new flags were added. Problem probably only showed up now because loader.c wasn't rebuilt until recent changes. -- common/loader.c, common/loader.l: add extern to arch_init, when loading and get an object from a file, complain and ignore it if arch_init is not set (only time we should get object (vs arch) for names is when we load the archetypes file). Add missing entries to flag_links array. common/treasure.c: Fix code so that proper plural names are generated for custom items (potions, flesh items, etc). include/define.h: Add note about updating flag_links when NUM_FLAGS is increased. server/skills.c: don't let players steal from players with FLAG_WIZ set. MSW 2002-06-09 | |||
Show difference between Revision 1.26 and 1.27 | |||
Revision 1.26 | avogl | 2002/03/01 15:33:09 | +5 -2 |
As announced on cf-devel, this is the patch which adds a new dragon-race to Crossfire. Players of this dragon race can gain resistances by eating the flesh of their defeated foes. They can also specify in a certain resistance-type and gain various abilities when increasing levels. This "focus" can be switched by eating very special As announced on cf-devel, this is the patch which adds a new dragon-race to Crossfire. Players of this dragon race can gain resistances by eating the flesh of their defeated foes. They can also specify in a certain resistance-type and gain various abilities when increasing levels. This "focus" can be switched by eating very special flesh, which will be available for sale. Dragon players gain special titles which cannot be overwritten by manually set titles. Also see the dragon race description during the race selection process. Note that the quetzal has been slightly modified (picture and race) to prevent getting mixed up with the new dragon race. Please keep in mind that this is the first version of this dragon-race-code. Do not expect it to be perfectly balanced in all aspects. Player's opinions will provide some good feedback for further development I hope. --AndreasV | |||
Show difference between Revision 1.25 and 1.26 | |||
Revision 1.25 | garbled | 2002/01/01 17:37:54 | +2 -1 |
Add the concept of overlay maps to the code. An overlay map is a map which is loaded on top of another map, replacing values in the header, and placing objects on top of other objects. This is the fundamental part of the new weather code, but also can be used to allow dynamic editing of the worldmaps by DM's eventually. garbled 2002-01-01 Phase II of the new weather system is done. Please let me know immediately if this causes any bizzare effects. | |||
Show difference between Revision 1.24 and 1.25 | |||
Revision 1.24 | mwedel | 2001/12/23 02:17:36 | +3 -3 |
common/loader.l, common/loader.c, common/object.c, include/object.h, socket/item.c: Remove sub_type and sub_type2 information - these were poorly named fields and not properly implemented. common/treasure.c: Add missing return type to change_treasure function. crossedit/Edit.c: Add SET_MAP_FLAGS macro to set P_NEED_UPDATE flag before calling update_position. include/config.h: Add NEW_WORLD_MAP selection which results in proper emergency save paths if you are using the maps-bigworld distribution. server/c_wiz.c: Fix the formatting (indentation) of the command_create function. No actual changes in how it runs, but the old formatting was really terrible and inconsistent. server/main.c: remove call to send_mapstats_cmd server/monster.c: Update the comment style to be proper, as well as the comments themselves. socket/request.c: Fix up improper indentation in esrv_update_stats. remove send_mapstats_cmd function. MSW 2001-12-23 | |||
Show difference between Revision 1.23 and 1.24 | |||
Revision 1.23 | michtoen | 2001/11/17 15:25:21 | +19 -1 |
commit the ext2 gender & guild system - first part. Sorry, my cvs sytem is still broken, i will write a better doc to the list. Notice some other small fixes too. | |||
Show difference between Revision 1.22 and 1.23 | |||
Revision 1.22 | michtoen | 2001/11/15 19:34:17 | +29 -6 |
Insert first step to give the treasure fil and his parsing more power. Sadly, the treasure file is not connected with the arch parsing. I add a small interface. You can with it insert change commands in the teasurelist. | |||
Show difference between Revision 1.21 and 1.22 | |||
Revision 1.21 | michtoen | 2001/10/29 20:30:19 | +2 -2 |
Remove a bug, reset some modules | |||
Show difference between Revision 1.20 and 1.21 | |||
Revision 1.20 | michtoen | 2001/10/29 18:49:02 | +3 -3 |
really SOME fixes - most casting | |||
Show difference between Revision 1.19 and 1.20 | |||
Revision 1.19 | gros | 2001/10/14 02:57:14 | +20 -76 |
Major changes: Added dynamic plugin support, removed old Guile support. - Gros 10/14/01 | |||
Show difference between Revision 1.18 and 1.19 | |||
Revision 1.18 | mwedel | 2001/07/13 23:04:53 | +2 -4 |
common/Makefile.in: Remove ltostr.c and sqrt.c from list of files common/ltostr.c, common/sqrt.c: Moved into porting.c common/anim.c, common/button.c, common/item.c: Update calls to update_object common/living.c: have fix_player calculate light value for player/monster. common/logger.c: Remove code that has server exit if too many LOG messages happen too quickly. This was not a reliable mechanism, and it should really be up to the functions doing the logging to know if they can continue or not. common/los.c: Changes on how it deals with lighting on maps - get light value from map space array instead of using the linked list. Functions that managed the light list have been removed. Change logic of line of sight function to be more efficient (before, we may examine the same space multiple times). rename update_all_los to update_all_map_los, and change update_all_los to take coordinates so that we only have clients within view of the change recalculate los. Also, have update_all_los check for tiled maps that may have clients that need to get updated. common/map.c: remove refresh_map - this used to be used to try to recover from map errors if many_cores was not set - IMO better to core and just restart and really fix the error than try to deal with possible corruption that may otherwise result. Move open_and_uncompress and close_and_delete functions to porting.c - they are 'common' functions that are not related to the map code. Remove some lighting related code, as that is no longer done with a list. Many modifications because of new map structure. And logic to load and save the new map structure format. Modify many of the functions to take map tiling into account. Change way multipart objects are saved, and add logic to relink objects when maps are loaded up. Remove some functions that are only used by the editor into the editor. Move update_position from object.c to map.c as it is better placed in map.c. Modify function to figure out light for a space. Make out_of_map a function that knows about map tiling. New function - get_map_from_coord which knows about map tiling and does coordinate and map translation. common/object.c: Have update_object take another parameter which tells update object what has changed about the object. This lets the function know if it should call update_position right away or if it can just mark the space as needing an update at a later time. move update_position to map.c. insert_ob_in_map: now takes another parameter that describes actions not to do. modified to know about map tiling and do appropriate translation. Does some object sorting so it should handle spell objects more efficiently. insert_ob_in_map_simple is now replaced by using appropriate flag to this changed version of insert_ob_in_map. Clean up remove_ob - seemed to have done things in a more complicated fashion that is no longer necessary. Modify check_walk_on to look at all objects on space, not those below the object - with changes to insert_ob_in_map, new object won't always be on top. common/porting.c: functions from ltostr.c, sqrt.c, as open_and_uncompress close_and_delete, make_path_to_file from map.c common/treasure.c: Modified to use updated insert_ob_in_map MSW 2001-07-13 | |||
Show difference between Revision 1.17 and 1.18 | |||
Revision 1.17 | gros | 2001/06/23 07:59:22 | +37 -1 |
Added support for script_str_... structures in artifact file - Gros 2001-06-23 | |||
Show difference between Revision 1.16 and 1.17 | |||
Revision 1.16 | michtoen | 2001/06/13 07:52:20 | +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.15 and 1.16 | |||
Revision 1.15 | michtoen | 2001/06/13 05:38:58 | +40 -4 |
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.14 and 1.15 | |||
Revision 1.14 | mwedel | 2001/05/28 23:41:53 | +9 -7 |
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.13 and 1.14 | |||
Revision 1.13 | mwedel | 2001/05/02 18:39:09 | +2 -2 |
lib/treasures: Fix error for bracers_of_gnarg - treasurelist was improperly formed, causing crashes at server startup. common/treasure.c: Fix load_treasure so that it won't crash dump trying to de-referance a null pointer, and instead give proper error message. MSW 2001-05-02 | |||
Show difference between Revision 1.12 and 1.13 | |||
Revision 1.12 | mardahl | 2001/04/27 05:39:48 | +3 -1 |
Found out why speed was set to 0... made artifacts join. (I think.) PeterM | |||
Show difference between Revision 1.11 and 1.12 | |||
Revision 1.11 | mardahl | 2001/04/25 02:46:57 | +2 -2 |
Small change to treasure.c: artifacts were getting their speed set to zero for some reason. This had the effect of freezing artifact-generated monsters. Commenting this out didn't seem to break the images for other artifacts. PeterM | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | mardahl | 2001/04/20 20:22:43 | +2 -2 |
Make the faces of potions look better. Required commenting out some code is all. | |||
Show difference between Revision 1.9 and 1.10 | |||
Revision 1.9 | mardahl | 2001/03/28 00:37:48 | +2 -2 |
removed an int overflow | |||
Show difference between Revision 1.8 and 1.9 | |||
Revision 1.8 | cvs | 2001/02/11 03:12:12 | +2 -2 |
MSW 2001/01/11: Other than various general cleanups, the main change this code does is that style maps (for random maps) get loaded special now - they objects they contain are not put on the active list, and they use a private map list so they do not appear in the output of the 'maps command. common/arch.c, common/treasure.c,server/login.c: Update calls to load_object common/loaderl.l,loader.c: Update lex_load to take an optional flags option. This is currently only used so that the loader can decide if it should call update_ob_speedto put objects on the active list or not. Calls to lex_load updated. load_object modified to take another option common.map.c: remove PROCESS_WHILE_LOADING and CHECK_ACTIVE_MAPS ifdefs. update calls to load_object. Remove some dead code. include/config.h: Remove CHECK_ACTIVE_MAPS and PROCESS_WHILE_LOADING flags. Those options did not work, and in all likelihood, this would be done via threading now days and not what code was there. include/libproto.h, sproto.h: updated or various function changes. include/map.h: Add MAP_STYLE flag. random_maps/exit.c: Call set_map_timeout after we load the final map so it will get swapped out. random_maps/standalone.c: Add dummy set_map_timeout function so it compiles. random_maps/style.c: Add load_style_map function which does the job of actually checking to see if a style map is in memory, and if not, loads it up. Updates the pointers so it appears on a map style map list and not the general map list. server/main.c: create set_map_timeout function that deals with setting the map timeouts. Fix bug so server doesn't crash if two players kill each other on hall of selection. server/monster.c remove dead code. socket/loop.c: If realloc fails, catch it and exit with meaningful error message. End of MSW 2001/02/11 checkin. | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | cvs | 2001/01/15 16:33:32 | +9 -7 |
MSW 2000/01/15: Various fixes for friendly object code: common/button.c: Add missing call to remove_friendly_object common/friend.c: Pretty much completely re-written. add_friendly_object now checks to make sure the object being added isn't already on the list, remove_friendly_object will remove objects whose tags don't match, and added clean_friendly_list. common/object.c: No reason to use the function pointer to remove_friendly_object since that function is in the lib. common/time.c: Make DEBUG_TIME always on (no longer compile time option). other areas use the global var pticks, so if it was turned off, compile would break anyways. common/treasuer.c: No longer print debug messages on artifacts created. Cluttered log file making it hard to see more important errors. include/config.h: Remove DEBUG_TIME define. include/libproto.h: Rebuilt for clean_friendly_list function. server/main.c: rewrote do_specials to do things based on pticks variable. This allows various specials to be spread out across multiple ticks easier. Also, added clean_friendly_function to part of what this does. server/skills.c: add missing call to remove_friendly_object. Also, removed from #if 0 .. #else .. #endif code. End of MSW 2000/01/15 checkin. | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | cvs | 2000/12/27 01:53:33 | +62 -30 |
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.5 and 1.6 | |||
Revision 1.5 | cvs | 2000/12/04 22:56:36 | +2 -11 |
MSW 2000/12/4: common/treasure.c: Make it so resistances from artifact files are absolute adjustments. Makefile.in configure configure.in: Fix check for libdes to see if des_crypt exists in libdes before setting HAVE_LIBDES crossedit/Makefile.in: Add Cnv/libCnv.a before LIBS - should fix linking error on irix systems. utils/metaserver.pl: modified so it ignores entries from hosts that report their name as put.your.hostname.here | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | cvs | 2000/12/03 18:40:03 | +163 -185 |
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.3 and 1.4 | |||
Revision 1.3 | jec | 2000/05/26 04:50:45 | +3 -3 |
* apply() cleanup patch 26/5/2000 | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | cvs | 1999/07/13 01:02:42 | +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.1 | uid200 | 1999/04/02 13:10:03 | None |
Initial revision | |||
First version | |||
Revision 1.1.1.1 | uid200 | 1999/04/02 13:10:03 | +0 -0 |
First CVS revsion: crossfire-0.95.3 | |||
Show difference between Revision 1.1 and 1.1.1.1 | |||
Revision 1.38.2.2 | mwedel | 2003/09/15 23:20:49 | +3 -2 |
More fix for artifact script events. Remove hardcode entry for number of events, and update problem with event->type not being set, causing crashes when it goes to save the object. MSW 2003-09-15 | |||
Show difference between Revision 1.38.2.1 and 1.38.2.2 | |||
Revision 1.38.2.1 | mwedel | 2003/09/14 19:04:00 | +3 -1 |
Fix problem with the even structure not fully being initiliazed, resulting in crashes for artifacts that have events (eg, occidental mages item). MSW 2003-09-14 | |||
Show difference between Revision 1.38 and 1.38.2.1 |