Files
oboe/Blades of Exile/boe.fields.h
Chokboyz 821d7609a2 Classic Blades of Exile :
- Various aesthetics fixes (no more buttons cut in half, justified some buttons, etc)
- Clicking the help icon next to the (unused) job button now correctly displays help.
- Redid the implementation of the (new) "check statistic node" (replaces "has enough mage lore") to prevent potential compatibility breaking with legacy scenarios.
- Small change to the (new) "Set town status" (replaces "Make Town Hostile") for the same reason.
- To clarify, renamed the "Dispel spirit" item ability to "Ravage spirit" (as it is, in fact, the spell called by the ability).
- For the same reason, renamed the monster spell "Heal All" to "Full Heal", as it isn't a mass spell but a powerful (and reliable) self-healing spell for monsters.
- Aligned the sleep immunity on the mac version : Slimes (regardless of the monster number), Stone and Undead types monsters are immuned to sleep.
- Dart throwing now only takes 2 ap for monsters (corrected from invisibility ability).
- Field generating monsters are now immuned to the type of field they generate (corrected from an Exile 3 incomplete transition).
- Rewrote the pending special queue for better events handling (no more potential overflow, entering/exiting town events are now sure to happens)
- Implemented the "No Terrain Animation" option.
- Un/Equipping something while in combat now correctly updates the ap display.
- MOnsters missile abilities now show their correct damage range in description (game and editor).
- Bashing weapons charges (if any) are now correctly shown (as usual, next to the name).

Codewise :

- The game shouldn't check if the item to be equipped is food anymore.
- Replaced lots of number checks by "human-readable" constants (some new).
- Removed some false checks about awaken spell supposed to work as dispel field.
- Fleeing and winning an outdoor battle now call the run_special function with the correct parameter (was reversed, with no consequences, since it's never checked)
- AI doesn't check the monster number, when deciding if the monster should cast a mage spell, anymore.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@159 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-11-26 21:27:18 +00:00

101 lines
4.6 KiB
C

#ifndef _FIELDS_H
#define _FIELDS_H
#include "global.h"
#include "globvar.h"
/* explored :
0000 0001 is the space explored ?
0000 0010 force wall is present
0000 0100 fire wall is present
0000 1000 antimagic field is present
0001 0000 stink cloud is present
0010 0000 ice wall is present
0100 0000 blade wall is present
1000 0000 sleep cloud is present
misc_i :
0000 0001 <not used>
0000 0010 special is present
0000 0100 web is present
0000 1000 crate is present
0001 0000 barrel is present
0010 0000 fire barrier is present
0100 0000 force barrier is present
1000 0000 quickfire is present
sfx :
0000 0001 small blood
0000 0010 medium blood
0000 0100 large blood
0000 1000 small slime
0001 0000 big slime
0010 0000 ash
0100 0000 bones
1000 0000 rubble
*/
inline Boolean is_web(short i,short j) { return (misc_i[i][j] & 4) ? true : false; }
inline void take_web(short i,short j) { misc_i[i][j] &= 251; }
inline Boolean is_crate(short i,short j) { return (misc_i[i][j] & 8) ? true : false; }
inline void make_crate(short i,short j) { misc_i[i][j] = misc_i[i][j] | 8; crate = true; }
inline void take_crate(short i,short j) { misc_i[i][j] &= 247; }
inline Boolean is_barrel(short i,short j) { return (misc_i[i][j] & 16) ? true : false; }
inline void make_barrel(short i,short j) { misc_i[i][j] = misc_i[i][j] | 16; barrel = true; }
inline void take_barrel(short i,short j) { misc_i[i][j] &= 239; }
inline Boolean is_fire_barrier(short i,short j) { return (misc_i[i][j] & 32) ? true : false; }
inline void make_special(short i,short j) { misc_i[i][j] = misc_i[i][j] | (char) (2); }
inline void take_special(short i,short j) { misc_i[i][j] &= 253; }
inline Boolean is_small_blood(short i,short j) { return (sfx[i][j] & 1) ? true : false; }
inline Boolean is_medium_blood(short i,short j) { return (sfx[i][j] & 2) ? true : false; }
inline Boolean is_large_blood(short i,short j) { return (sfx[i][j] & 4) ? true : false; }
inline Boolean is_small_slime(short i,short j) { return (sfx[i][j] & 8) ? true : false; }
inline Boolean is_big_slime(short i,short j) { return (sfx[i][j] & 16) ? true : false; }
inline Boolean is_ash(short i,short j) { return (sfx[i][j] & 32) ? true : false; }
inline Boolean is_bones(short i,short j) { return (sfx[i][j] & 64) ? true : false; }
inline Boolean is_rubble(short i,short j) { return (sfx[i][j] & 128) ? true : false; }
inline void take_fire_barrier(short i,short j) { misc_i[i][j] &= 223; }
inline Boolean is_force_barrier(short i,short j) { return (misc_i[i][j] & 64) ? true : false; }
inline void take_force_barrier(short i,short j) { misc_i[i][j] &= 191; }
inline Boolean is_quickfire(short i,short j) { return (misc_i[i][j] & 128) ? true : false; }
inline void take_quickfire(short i,short j) { misc_i[i][j] &= 127; }
inline Boolean is_force_wall(short i,short j) { return (c_town.explored[i][j] & 2) ? true : false; }
inline void take_force_wall(short i,short j) { c_town.explored[i][j] &= 253; }
inline Boolean is_fire_wall(short i,short j) { return (c_town.explored[i][j] & 4) ? true : false; }
inline void take_fire_wall(short i,short j) { c_town.explored[i][j] &= 251; }
inline Boolean is_antimagic(short i,short j) { return (c_town.explored[i][j] & 8) ? true : false; }
inline void take_antimagic(short i,short j) { c_town.explored[i][j] &= 247; }
inline Boolean is_scloud(short i,short j) { return (c_town.explored[i][j] & 16) ? true : false; }//stinking cloud
inline void take_scloud(short i,short j) { c_town.explored[i][j] &= 239; }
inline Boolean is_ice_wall(short i,short j) { return (c_town.explored[i][j] & 32) ? true : false; }
inline void take_ice_wall(short i,short j) { c_town.explored[i][j] &= 223; }
inline Boolean is_blade_wall(short i,short j) { return (c_town.explored[i][j] & 64) ? true : false; }
inline void take_blade_wall(short i,short j) { c_town.explored[i][j] &= 191; }
inline Boolean is_sleep_cloud(short i,short j) { return (c_town.explored[i][j] & 128) ? true : false; }
inline void take_sleep_cloud(short i,short j) { c_town.explored[i][j] &= 127; }
Boolean is_explored(short i,short j);
void make_explored(short i,short j);
Boolean is_out();
Boolean is_town();
Boolean is_combat();
Boolean special(short i,short j);
void make_web(short i,short j);
void make_fire_barrier(short i,short j);
void make_force_barrier(short i,short j);
void make_quickfire(short i,short j);
void make_force_wall(short i,short j);
void make_fire_wall(short i,short j);
void make_antimagic(short i,short j);
void make_scloud(short i,short j);
void make_ice_wall(short i,short j);
void make_blade_wall(short i,short j);
void make_sleep_cloud(short i,short j);
void make_sfx(short i,short j, short type);
#endif