1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2001 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2001 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
294 | |
294 | |
295 | // 8 free bits |
295 | // 8 free bits |
296 | |
296 | |
297 | //float ACC (RW, expmul) = 1.0; /* needed experience = (calc_exp*expmul) - means some */ |
297 | //float ACC (RW, expmul) = 1.0; /* needed experience = (calc_exp*expmul) - means some */ |
298 | // /* races/classes can need less/more exp to gain levels */ |
298 | // /* races/classes can need less/more exp to gain levels */ |
299 | static const float expmul = 1.0;//D |
299 | constexpr static const float expmul = 1.0;//D |
300 | float ACC (RW, move_slow_penalty); /* How much this slows down the object */ |
300 | float ACC (RW, move_slow_penalty); /* How much this slows down the object */ |
301 | |
301 | |
302 | /* Following are values used by any object */ |
302 | /* Following are values used by any object */ |
303 | /* this objects turns into or what this object creates */ |
303 | /* this objects turns into or what this object creates */ |
304 | treasurelist *ACC (RW, randomitems); /* Items to be generated */ |
304 | treasurelist *ACC (RW, randomitems); /* Items to be generated */ |
… | |
… | |
435 | // object op is trying to move in direction dir. |
435 | // object op is trying to move in direction dir. |
436 | // originator is typically the same as op, but |
436 | // originator is typically the same as op, but |
437 | // can be different if originator is causing op to |
437 | // can be different if originator is causing op to |
438 | // move (originator is pushing op) |
438 | // move (originator is pushing op) |
439 | // returns 0 if the object is not able to move to the |
439 | // returns 0 if the object is not able to move to the |
440 | // desired space, 1 otherwise (in which case we also |
440 | // desired space, 1 otherwise (in which case we also |
441 | // move the object accordingly. This function is |
441 | // move the object accordingly. This function is |
442 | // very similiar to move_object. |
442 | // very similiar to move_object. |
443 | int move (int dir, object *originator); |
443 | int move (int dir, object *originator); |
444 | |
444 | |
445 | int move (int dir) |
445 | int move (int dir) |
… | |
… | |
582 | |
582 | |
583 | static bool msg_has_dialogue (const char *msg) { return *msg == '@'; } |
583 | static bool msg_has_dialogue (const char *msg) { return *msg == '@'; } |
584 | |
584 | |
585 | MTH bool has_dialogue () const { return msg_has_dialogue (&msg); } |
585 | MTH bool has_dialogue () const { return msg_has_dialogue (&msg); } |
586 | |
586 | |
587 | /* need_identify returns true if the item should be identified. This |
587 | /* need_identify returns true if the item should be identified. This |
588 | * function really should not exist - by default, any item not identified |
588 | * function really should not exist - by default, any item not identified |
589 | * should need it. |
589 | * should need it. |
590 | */ |
590 | */ |
591 | MTH bool need_identify () const; |
591 | MTH bool need_identify () const; |
592 | |
592 | |
… | |
… | |
959 | * INS_ABOVE_FLOOR_ONLY: Put object immediatly above the floor. |
959 | * INS_ABOVE_FLOOR_ONLY: Put object immediatly above the floor. |
960 | * INS_NO_WALK_ON: Don't call check_walk_on against the |
960 | * INS_NO_WALK_ON: Don't call check_walk_on against the |
961 | * originator - saves cpu time if you know the inserted object |
961 | * originator - saves cpu time if you know the inserted object |
962 | * is not meaningful in terms of having an effect. |
962 | * is not meaningful in terms of having an effect. |
963 | * INS_ON_TOP: Always put object on top. Generally only needed when loading |
963 | * INS_ON_TOP: Always put object on top. Generally only needed when loading |
964 | * files from disk and ordering needs to be preserved. |
964 | * files from disk and ordering needs to be preserved. |
965 | * INS_BELOW_ORIGINATOR: Insert new object immediately below originator - |
965 | * INS_BELOW_ORIGINATOR: Insert new object immediately below originator - |
966 | * Use for treasure chests so the new object is the highest thing |
966 | * Use for treasure chests so the new object is the highest thing |
967 | * beneath the player, but not actually above it. Note - the |
967 | * beneath the player, but not actually above it. Note - the |
968 | * map and x,y coordinates for the object to be inserted must |
968 | * map and x,y coordinates for the object to be inserted must |
969 | * match the originator. |
969 | * match the originator. |