Welcome to the prototype combat code. --------- It works, to the best of my knowledge. It's also entailed a number of changes here and there in the server. In order to have "armor" (useful kind of thing in combat) I have added a "Wearing" list, and a "wear" (and unwear) command. For something to count as armor that is being worn, it has to have its _isarmor flag set. This I consider a Way Cool feature, since, if you don't OWN the object you can't examine it, and have no way of telling if it's armor at all. You can wear it, but it may not benefit you, in other words. Another new attribute (analogous to "using") is "weapon". The used-weapon *MUST* have the _isweapon flag set, and must be wielded using the "wield" command. Just like with armor, you have (heh, heh) no way of telling if a weapon does anything, helps you, or hurts you. Attacks are limited to being executed either directly by the player or bound to the player's weilded weapon. This is to prevent room ofails and whatnot from making people flail wildly at eachother. New commands: wear thing - put on clothes. if they have an isarmor flag, they help you in fight unwear thing - take off clothes/armor. _combat "register" - registers you as a combatant and gives you an initial allocation of 1000 power points to divide up among your combat attributes. "allocate attribute points" - allows you to allocate 'points' points to your base value for attribute 'attribute'. you start at zero and will need to "heal up" to your base value after allocation. EG: allocate str 100 "update" - triggers a statistics update. these are done automatically whenever you fight, or do a "stats", but for some reasons, you may wish to update manually. "help" - help "stats" - lists a quick status report. wield thing - use a thing as a weapon. must have isweapon set. _attack victim attribute value risk [success string] [fail string] attack the victim's named attribute, gambling 'risk' points of the attribute against 'value' points on the victim. if the attack succeeds, the success string (if one) is emoted. the fail string is emoted if the attack fails, and the attacker loses points. How combat works (basically) ---------------------------- If you've never registered to get your power points for combat, you are a noncombatant and can be neither attacked nor can you attack. Once you allocate points, you have to heal them back up to normal levels. Healing is based on a timestamp (GMT) in the player object, which is used to perform a simple kind of compounding interest to determine how many points you heal over time. This works out well, since if you have a base 100 points in an attribute, and lose 5, you'll heal very fast. If you get beaten to within a point of your life, you'll take a LONG time to heal. Updates are done automatically whenever you fight, or request an update. You attack the other guy, against an attribute, and gamble a number of your points against a number of h*. If you win a die-roll, h* loses the points you attacked. If you lose, you lose the points you gambled. The odds are slightly canted in favor of the defense, so a 1:1 attack has an actual 41% chance of success. A 2:1 attack has a 74% chance of success, and a 1:2 attack has a 15% chance of success. This slants in favor of making safe and high-margin attacks, which is reasonable. When you're wielding a weapon that has a value in the attribute you're attacking, it is quietly added to what you're risking. Suppose Bert attacks Larry's strength, attacking 10 points and gambling 10 points that he'll win. His odds of winning are normally 41%, but he has a Magic Spleening Sword that has a weapon bit, and he's wielding it, and it has a strength of 5. Bert's attack is now 15 points attacking Larry's 10, giving him a 61% chance of winning. If a player is wearing armor and is attacked, the armor absorbs hits directly. Armor is thus (as is real) more useful than a weapon, in a slug-fest. In the example above, suppose Bert hits Larry. Larry has just taken 10 points of strength damage. If, however, Larry is wearing his Magical Codpiece of Fiberglass, which has an isarmor bit set and a strength of 4, Larry only takes 6 points of damage. If Bert had only done 3 points of damage, a message to the effect that Bert's attack glances off of Larry's armor would have been printed. Armor is Good Stuff. You can wear up to 6 items of clothing, but (unless you know it) all, some, or none of it may be armor. Negative weapon/armor values work. Beware -30 strength weapons. Negative armor is VERY bad stuff. Counterattacks are executed automatically by the defender if it survives the attack AND has a valid counterattack set. Counterattacks are stored as a list attribute on any player, (attribute 'counters') and are settable by the player. Each counterattack list element is a separate counterattack, which is chosen at random from the list when a counterattack is executed. For example: lst counter=str 5 10 'hops up!' 'hops down!';str 5 20 'wubbaup!' 'wubbadown!'; This is two counterattacks, and if the player is attacked, one will be picked at random. The first will attempt to attack 5 points of the attacker's strength, with 10 points of strength, and has a failure and a success message attached. The second will do likewise, but has different messages and values. Note the quoting rules and $-var expansion apply to the counterattacks *AFTER* the list element has been selected. Counterattacks are in all other ways just like an attack. mjr.