Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 6, 2019 15:48:26 GMT -5
Do any of you code readers know if missing with any of the four missile types causes a Base o Raise?
|
|
|
Post by shakes on May 2, 2019 22:56:40 GMT -5
case CMD_SHOOT: act("$n steadies $mself and takes aim.", TRUE, ch, 0, 0, TO_ROOM); act("You take aim at your target...", FALSE, ch, 0, 0, TO_CHAR); if (has_skill(ch, SKILL_ARCHERY)) /* if (ch->skills[SKILL_ARCHERY]) */ d->timeout = skill_delay(ch->skills[SKILL_ARCHERY]->learned); else d->timeout = skill_delay(15); break;
Okay, so this is a pretty straightforward skill. I just grabbed archery as an example, but I think it's going to be the same for crossbows and slings. I'm not entirely sure about blowguns since they're new.
cmd_shoot(CHAR_DATA * ch, const char *argument, Command cmd, int count) { // int shoot_dir = 0; // struct affected_type af; CHAR_DATA *victim = NULL; ROOM_DATA *tar_room; OBJ_DATA *bow; OBJ_DATA *arrow; int dir = 0, dist = 0, n = 0, dam, offense, defense, alive; int prior_hitpoints; bool is_hit = FALSE, is_primary = FALSE, loaded = FALSE; char arg1[256], arg2[256], arg3[256], new_ld[256], temp_ld[256]; char buf[256], oldarg[MAX_STRING_LENGTH]; OBJ_DATA *wagobj = NULL;
This is what happens when it processes.
Looking through this, you either hit or you miss. If you miss, it procs the skill_learned function, meaning you learned (assuming your skill timer isn't locking you out).
Doesn't matter if you hit the neck, head, or big toe. A hit is a hit and a miss is a miss.
My own methods of training up archery are to find the dodgiest thing I can (reasonably fast) like a turaal, a jozhal, or a gith, and then shoot them from max distance. Early on almost anything will do but as you start to reach journeyman you start finding it hard to get a miss with decent agility.
|
|
|
Post by najdorf on May 3, 2019 1:21:24 GMT -5
storms give a decent penalty, so higher chance of miss shoot 2 rooms @ turaals or ring tailed jozhals when there is harsh sandstorm to get it to advanced/master then go to Valley and shoot mantises Also 1 miss is enough, don't waste arrows. Take your 1 miss and wait for your timer
PS: Beware the auto dodge creatures, some type of a gortok for instance always used to dodge due to some code bug. They don't skill you up
|
|
|
Post by lechuck on May 3, 2019 1:41:44 GMT -5
It's not actually a bug. Mobiles with the "sentinel" flag can't be hit with ranged attacks, and it doesn't count as a failure for skillgains. Sentinel means they won't wander around. All kinds of random NPCs are sentinel, like the muggers on Hathor's and any NPC in a tavern. Anytime an NPC never moves from the room where it loads, it's because it's sentinel. It's meant to prevent shooting gate guards to death but gets used in other places where it becomes weird. The other way to prevent a mobile from moving is to make the surrounding rooms no_mob which is impractical in most places as it causes wandering NPCs to pile up.
I don't think offense and missile attacks interact at all. As far as I can tell, offense only comes into play in melee combat. There could be interaction with defense and getting shot at but I haven't looked at that. I'm pretty sure offense doesn't go up when missing a shot/throw. It would be kinda silly if it did since you can freely miss throws all day against non-aggro NPCs, especially if you don't actually have the skill.
|
|