Module m_special_weapon

Documentation for the modules-m_special_weapon module in /std/modules/m_special_weapon.c.

Module Information

This module can be used to create magical / special weapons for the mud. It includes randomization functions for materials and spell-like powers. These powers ranged from common (less powerful) to very rare powers (very powerful). The weapons can be upgraded using the

void upgrade_weapon_material() – chance to upgrade the material to the next tier. void upgrade_weapon_attack() – chance to upgrade the attack level to the next tier.

These functions should be interfaced from a smith or other NPC that takes some materials, money etc. to attempt an upgrade. The item will increase in value automatically once upgraded.

Functions

int query_special_mat_level()

int query_special_mat_level() Returns the material level of the special weapon.

int query_special_att_level()

int query_special_att_level() Returns the special attack level of the weapon.

void roll_item()

void roll_item() Must be called from weapons inherting M_SPECIAL_WEAPON in setup() to randomize the weapon so it’s ready for player pickup. This function is automatically not called more than once, and not when player quits and loads again.

int upgrade_weapon_material()

int upgrade_weapon_material() Call to attempt a material upgrade. Value of item is adjusted automatically. Returns the value incrase if any.

int upgrade_weapon_attack()

int upgrade_weapon_attack() Call to attempt an attack power upgrade. Value of item is adjusted automatically. Returns the value incrase if any.

File generated by Lima 1.1a4 reStructured Text daemon.