PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
mobile.opponent to return opponent even if just defending

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 107

PostPosted: Sun Mar 09, 2008 1:44 am    Post subject: mobile.opponent to return opponent even if just defending Reply with quote

I considered this is more a lack of feature than a bug.

Core-changes.txt, Austin wrote:
Added : Member for mobiles ".opponent". Returns a mobile reference if a combat opponent is selected.


If PC or NPC (through SetOpponent()) selects an opponent mobile.opponent works right like it is supposed to:
attacker's .opponent returns reference to chosen victim.

But, would be nice if the mobile that are attacked against (if is not attacking anyone), would get it's .opponent-member updated to return the reference of the attacker.

Currently (POL 097) this won't happen; defender.opponent is null.

The idea in other words: there are these mobiles A, B and C, all at ease.
1. A attacks B -> A.opponent returns B. Because B is not attacking no-one, B.opponent would return A.
2. C attacks B -> C.opponent would return B, but B.opponent stays the same (returning A).
3. B choses to attack C instead of defending against A -> B.opponent returns C.
4. C gives up (or dies) -> C.opponent returns null, B.opponent returns A (defending against), A.opponent returns B (attacking against).

...That should clear it up.

After this modification one would be able to tell easily the real opponent the mobile has. I can not think of any reason why this would be harmless (and thus bad thing to implement), but if there is one, please do tell.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty