… | |
… | |
1581 | |
1581 | |
1582 | /* make_throw_ob() We construct the 'carrier' object in |
1582 | /* make_throw_ob() We construct the 'carrier' object in |
1583 | * which we will insert the object that is being thrown. |
1583 | * which we will insert the object that is being thrown. |
1584 | * This combination becomes the 'thrown object'. -b.t. |
1584 | * This combination becomes the 'thrown object'. -b.t. |
1585 | */ |
1585 | */ |
1586 | |
|
|
1587 | static object * |
1586 | static object * |
1588 | make_throw_ob (object *orig) |
1587 | make_throw_ob (object *orig) |
1589 | { |
1588 | { |
1590 | if (!orig) |
1589 | if (!orig) |
1591 | return NULL; |
1590 | return NULL; |
… | |
… | |
1604 | toss_item->stats.dam = 0; /* default damage */ |
1603 | toss_item->stats.dam = 0; /* default damage */ |
1605 | insert_ob_in_ob (orig, toss_item); |
1604 | insert_ob_in_ob (orig, toss_item); |
1606 | return toss_item; |
1605 | return toss_item; |
1607 | } |
1606 | } |
1608 | |
1607 | |
1609 | |
|
|
1610 | /* do_throw() - op throws any object toss_item. This code |
1608 | /* do_throw() - op throws any object toss_item. This code |
1611 | * was borrowed from fire_bow. |
1609 | * was borrowed from fire_bow. |
1612 | * Returns 1 if skill was successfully used, 0 if not |
1610 | * Returns 1 if skill was successfully used, 0 if not |
1613 | */ |
1611 | */ |
1614 | |
|
|
1615 | static int |
1612 | static int |
1616 | do_throw (object *op, object *part, object *toss_item, int dir, object *skill) |
1613 | do_throw (object *op, object *part, object *toss_item, int dir, object *skill) |
1617 | { |
1614 | { |
1618 | object *throw_ob = toss_item, *left = NULL; |
1615 | object *throw_ob = toss_item, *left = NULL; |
1619 | int eff_str = 0, maxc, str = op->stats.Str, dam = 0; |
1616 | int eff_str = 0, maxc, str = op->stats.Str, dam = 0; |