ES2 MUD LIB :: 東方故事二(ES2) 天朝帝國 mudlib 瀏覽展示

/feature/weapon/sword.c

HOME :: feature :: weapon :: sword.c
/*  sword.c

    Copyright (C) 1994-2000 Annihilator 

    This program is a part of ES2 mudlib. Permission is granted to use,
    modify, copy or distribute this program provided this copyright notice
    remains intact and subject to the restriction that this program MAY
    NOT be used in any way for monetary gain.

    Details of terms and conditions is available in the Copyright.ES2 file.
    If you don't receive this file along with this program, write to the
    primary author of ES2 mudlib: Annihilator 
*/

varargs void init_damage(int, int, int, int, mixed...);

void
setup_sword(int x, int y, int z, int r)
{
    if( x < 1 || x > 5 )
        error("damage multiplier out of range.\n");
    if( y < 1 || y > 20 )
        error("damage range out of range.\n");
    if( z < 1 || z > 150 )
        error("damage strength bonus out of range.\n");
    if( r < -x || r > 10 )
        error("damage roll out of range.\n");

    init_damage(x, y, z, r, "sword");
    init_damage(x, y/2, z, r, "secondhand sword");
    init_damage(x, y*3/2, z*4/3, r, "twohanded sword");
}
HOME :: feature :: weapon :: sword.c