… | |
… | |
749 | const_iv (ST_BD_BUILD) |
749 | const_iv (ST_BD_BUILD) |
750 | const_iv (ST_BD_REMOVE) |
750 | const_iv (ST_BD_REMOVE) |
751 | const_iv (ST_MAT_FLOOR) |
751 | const_iv (ST_MAT_FLOOR) |
752 | const_iv (ST_MAT_WALL) |
752 | const_iv (ST_MAT_WALL) |
753 | const_iv (ST_MAT_ITEM) |
753 | const_iv (ST_MAT_ITEM) |
|
|
754 | |
|
|
755 | const_iv (AT_PHYSICAL) |
|
|
756 | const_iv (AT_MAGIC) |
|
|
757 | const_iv (AT_FIRE) |
|
|
758 | const_iv (AT_ELECTRICITY) |
|
|
759 | const_iv (AT_COLD) |
|
|
760 | const_iv (AT_CONFUSION) |
|
|
761 | const_iv (AT_ACID) |
|
|
762 | const_iv (AT_DRAIN) |
|
|
763 | const_iv (AT_WEAPONMAGIC) |
|
|
764 | const_iv (AT_GHOSTHIT) |
|
|
765 | const_iv (AT_POISON) |
|
|
766 | const_iv (AT_SLOW) |
|
|
767 | const_iv (AT_PARALYZE) |
|
|
768 | const_iv (AT_TURN_UNDEAD) |
|
|
769 | const_iv (AT_FEAR) |
|
|
770 | const_iv (AT_CANCELLATION) |
|
|
771 | const_iv (AT_DEPLETE) |
|
|
772 | const_iv (AT_DEATH) |
|
|
773 | const_iv (AT_CHAOS) |
|
|
774 | const_iv (AT_COUNTERSPELL) |
|
|
775 | const_iv (AT_GODPOWER) |
|
|
776 | const_iv (AT_HOLYWORD) |
|
|
777 | const_iv (AT_BLIND) |
|
|
778 | const_iv (AT_INTERNAL) |
|
|
779 | const_iv (AT_LIFE_STEALING) |
|
|
780 | const_iv (AT_DISEASE) |
754 | |
781 | |
755 | const_iv (QUEST_IN_PROGRESS) |
782 | const_iv (QUEST_IN_PROGRESS) |
756 | const_iv (QUEST_DONE_QUEST) |
783 | const_iv (QUEST_DONE_QUEST) |
757 | const_iv (QUEST_DONE_TASK) |
784 | const_iv (QUEST_DONE_TASK) |
758 | const_iv (QUEST_START_QUEST) |
785 | const_iv (QUEST_START_QUEST) |
… | |
… | |
1170 | int unused_type; |
1197 | int unused_type; |
1171 | object_set_property (&unused_type, obj, idx, (double)SvNV (newval)); |
1198 | object_set_property (&unused_type, obj, idx, (double)SvNV (newval)); |
1172 | } |
1199 | } |
1173 | break; |
1200 | break; |
1174 | case CFAPI_STRING: |
1201 | case CFAPI_STRING: |
1175 | cf_object_set_string_property (obj, idx, SvPV_nolen (newval)); |
1202 | cf_object_set_string_property (obj, idx, SvOK (newval) ? SvPV_nolen (newval) : 0); |
|
|
1203 | break; |
|
|
1204 | case CFAPI_POBJECT: |
|
|
1205 | { |
|
|
1206 | int unused_type; |
|
|
1207 | object_set_property (&unused_type, obj, idx, (object *)SvPTR_ornull (newval, "cf::object")); |
|
|
1208 | } |
1176 | break; |
1209 | break; |
1177 | default: |
1210 | default: |
1178 | croak ("unhandled type '%d' in set_property '%d'", type, idx); |
1211 | croak ("unhandled type '%d' in set_property '%d'", type, idx); |
1179 | } |
1212 | } |
1180 | |
1213 | |
|
|
1214 | # missing properties |
|
|
1215 | |
|
|
1216 | void |
|
|
1217 | set_attacktype (object *obj, U32 attacktype) |
|
|
1218 | CODE: |
|
|
1219 | obj->attacktype = attacktype; |
|
|
1220 | |
|
|
1221 | U32 |
|
|
1222 | get_attacktype (object *obj) |
|
|
1223 | ALIAS: |
|
|
1224 | attacktype = 0 |
|
|
1225 | CODE: |
|
|
1226 | RETVAL = obj->attacktype; |
|
|
1227 | OUTPUT: RETVAL |
|
|
1228 | |
|
|
1229 | void |
|
|
1230 | set_food (object *obj, int food) |
|
|
1231 | CODE: |
|
|
1232 | obj->stats.food = food; |
|
|
1233 | |
|
|
1234 | int |
|
|
1235 | get_food (object *obj) |
|
|
1236 | ALIAS: |
|
|
1237 | food = 0 |
|
|
1238 | CODE: |
|
|
1239 | RETVAL = obj->stats.food; |
|
|
1240 | OUTPUT: RETVAL |
|
|
1241 | |
1181 | void |
1242 | void |
1182 | inv (object *obj) |
1243 | inv (object *obj) |
1183 | PROTOTYPE: $ |
1244 | PROTOTYPE: $ |
1184 | PPCODE: |
1245 | PPCODE: |
1185 | { |
1246 | { |
… | |
… | |
1216 | |
1277 | |
1217 | int cf_object_pay_item (object *op, object *buyer) |
1278 | int cf_object_pay_item (object *op, object *buyer) |
1218 | |
1279 | |
1219 | int cf_object_pay_amount (object *op, double amount) |
1280 | int cf_object_pay_amount (object *op, double amount) |
1220 | |
1281 | |
1221 | int cf_object_cast_spell (object *caster, object *ctoo, int dir, object *sp_, char *flags) |
1282 | int cf_object_cast_spell (object *caster, object *ctoo, int dir, object *spell_ob, char *stringarg = 0) |
1222 | |
1283 | |
1223 | int cf_object_cast_ability (object *caster, object *ctoo, int dir, object *sp_, char *flags) |
1284 | int cf_object_cast_ability (object *caster, object *ctoo, int dir, object *sp_, char *stringarg = 0) |
1224 | |
1285 | |
1225 | void cf_object_learn_spell (object *op, object *sp) |
1286 | void cf_object_learn_spell (object *op, object *sp) |
1226 | |
1287 | |
1227 | void cf_object_forget_spell (object *op, object *sp) |
1288 | void cf_object_forget_spell (object *op, object *sp) |
1228 | |
1289 | |
… | |
… | |
1264 | char *cf_object_get_key (object *op, char *keyname) |
1325 | char *cf_object_get_key (object *op, char *keyname) |
1265 | ALIAS: key = 0 |
1326 | ALIAS: key = 0 |
1266 | |
1327 | |
1267 | void cf_object_set_key (object *op, char *keyname, char *value) |
1328 | void cf_object_set_key (object *op, char *keyname, char *value) |
1268 | |
1329 | |
|
|
1330 | object *cf_create_object_by_name (const char *name) |
|
|
1331 | |
1269 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
1332 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
1270 | |
1333 | |
1271 | void cf_fix_object (object *pl) |
1334 | void cf_fix_object (object *pl) |
1272 | ALIAS: fix = 0 |
1335 | ALIAS: fix = 0 |
1273 | |
1336 | |
1274 | object *cf_insert_ob_in_ob (object *ob, object *where) |
1337 | object *cf_insert_ob_in_ob (object *ob, object *where) |
1275 | |
1338 | |
1276 | object *create_object_by_name (const char *name = 0) |
1339 | # no clean way to get an object from an archetype - stupid idiotic |
|
|
1340 | # dumb kludgy misdesigned plug-in api slowly gets on my nerves. |
|
|
1341 | |
|
|
1342 | object *new (const char *archetype = 0) |
1277 | PROTOTYPE: ;$ |
1343 | PROTOTYPE: ;$ |
1278 | ALIAS: |
|
|
1279 | create_object = 0 |
|
|
1280 | new = 0 |
|
|
1281 | CODE: |
1344 | CODE: |
1282 | RETVAL = name ? cf_create_object_by_name (name) : cf_create_object (); |
1345 | RETVAL = archetype ? get_archetype (archetype) : cf_create_object (); |
1283 | OUTPUT: |
1346 | OUTPUT: |
1284 | RETVAL |
1347 | RETVAL |
1285 | |
1348 | |
1286 | object *insert_ob_in_map_at (object *ob, mapstruct *where, object_ornull *orig, int flag, int x, int y) |
1349 | object *insert_ob_in_map_at (object *ob, mapstruct *where, object_ornull *orig, int flag, int x, int y) |
1287 | PROTOTYPE: $$$$$$ |
1350 | PROTOTYPE: $$$$$$ |