22#ifndef ULTIMA4_GAME_WEAPON_H
23#define ULTIMA4_GAME_WEAPON_H
25#include "ultima/ultima4/filesys/savegame.h"
50 WeaponType getType()
const {
59 bool canReady(ClassType klass)
const {
60 return (_canUse & (1 << klass)) != 0;
62 int getRange()
const {
65 int getDamage()
const {
77 unsigned short getFlags()
const {
81 bool loseWhenUsed()
const {
84 bool loseWhenRanged()
const {
87 bool canChooseDistance()
const {
90 bool alwaysHits()
const {
93 bool isMagic()
const {
96 bool canAttackThroughObjects()
const {
99 bool rangeAbsolute()
const {
102 bool returns()
const {
105 bool showTravel()
const {
110 Weapon(WeaponType weaponType,
const ConfigElement &conf);
121 unsigned short _flags;
Flags
Definition: weapon.h:37
@ WEAP_LOSEWHENRANGED
Definition: weapon.h:39
@ WEAP_ALWAYSHITS
Definition: weapon.h:41
@ WEAP_ABSOLUTERANGE
Definition: weapon.h:44
@ WEAP_DONTSHOWTRAVEL
Definition: weapon.h:46
@ WEAP_ATTACKTHROUGHOBJECTS
Definition: weapon.h:43
@ WEAP_LOSE
Definition: weapon.h:38
@ WEAP_CHOOSEDISTANCE
Definition: weapon.h:40
@ WEAP_MAGIC
Definition: weapon.h:42
@ WEAP_RETURNS
Definition: weapon.h:45
const Weapon * get(const Common::String &name)
const Weapon * get(WeaponType w)