Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  THING_IDENTIFY  (Read 39 times)

0 Members and 0 Guests are viewing this topic.

Dolfo

« on: 25, September 2023, 20:30:26 »
Code: [Select]
#define THING_IDENTIFY(_O_) \
    ((!QUERY_FLAG((_O_), FLAG_UNIDENTIFIABLE) && \
      SET_FLAG((_O_), FLAG_IDENTIFIED) && \
      SET_OR_CLEAR_FLAG((_O_), FLAG_KNOWN_MAGICAL, \
          QUERY_FLAG((_O_), FLAG_IS_MAGICAL)) <= 1 && \
      SET_OR_CLEAR_FLAG((_O_), FLAG_KNOWN_CURSED, \
          (QUERY_FLAG((_O_), FLAG_CURSED) || \
           QUERY_FLAG((_O_), FLAG_DAMNED))) <= 1) \
     ? 1 : 0)
Who is this macro junkie? Sadly we can't use if (THING_IDENTIFY) because there is no check in for that. Instead macro sets FLAG_IDENTIFIED independent what flag was before.

We also see that FLAG_UNIDENTIFIABLE is a break trigger for all 3 (identify, magic, curse/damned).
Then this macro is updating FLAG_KNOWN_MAGICAL and FLAG_KNOWN_CURSED, so we see indentify reveals also magic and cursed stuff.

Sadly putting all the checks in this AND chain means, that we have a situation where the curse update is not triggered, when we have a false situation in the magic update before.

So the return of this macro is mostly worthless and i need extra checks, if i want use this macro and make sure i only use this when not identified. Also these macros blow up server code like crazy. Is this really so much faster than using functions?

We should really rethink this and go for a cleaner logics. I would go first to remove reveal curses from identify logics. For sure this is not player friendly. Players need to identify and detect curse on their items, but with new changes player can sell their cursed stuff for full prices. So if they don't need the items, they can sell cursed stuff without revealing the curses. This also makes detect curse from smith and scrolls/devices worthfull again.

So yeah it's a little more mircomanagment for players, but we make worthless detect curse logics worthfull again?  ???
« Last Edit: 25, September 2023, 20:32:48 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Tags: