DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 09, 2010, 12:45:31 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: resurrection with no new day  (Read 864 times)
0 Members and 1 Guest are viewing this topic.
Tholgare
Guest
« on: October 01, 2004, 10:25:18 PM »

I dunno if anyone else might be interested in this, but I thought I'd post it just in case.  Basically, I didn't like that resurrection was giving players new days because, at least at low levels, it appeared that the extra forest fights were letting them gain back the 10% exp loss, not to mention people seemed to be using it to make extra money.  So, I modified the graveyard code a bit so res never hits new day.  Here it is (the commented addnav was the original line, roughly line 219 in the file):

Code:
       //addnav("Continue","newday.php?resurrection=true");
        //here's my hack to keep from giving players a new day
        //basically copied all the stuff from the newday res to here
        $session['user']['hitpoints']=$session['user']['maxhitpoints'];
        addnews("`&%s`& has been resurrected by `\$Ramius`&.",$session['user']['name']);
        $session['user']['resurrections']++;
        output("`n`n`@You are resurrected!  This is resurrection number %s.`n",$session['user']['resurrections']);
        $session['user']['alive']=true;
        $spirits=-6;
        $session['user']['turns']+=$spirits;
        $session['user']['spirits'] = $spirits;
        invalidatedatacache("list.php-warsonline");
        $session['user']['deathpower']-=100;
        $session['user']['restorepage']="village.php";
        addnav("Continue","village.php");

Having played around with it, I think it does everything res needs to do, without the benefits the new day was giving.
Logged
Tholgare
Guest
« Reply #1 on: October 02, 2004, 12:24:07 PM »

ok, so after a bit more testing, it looks like racial buffs aren't getting reset upon resurrection....I found the code from newday that looked like it reset the buffs, but no luck.  Anyone have any advice?

this is what I have at the moment:

Code:
       //addnav("Continue","newday.php?resurrection=true");
        //here's my hack to keep from giving players a new day
        //basically copied all the stuff from the newday res to here
        $session['user']['hitpoints']=$session['user']['maxhitpoints'];
        addnews("`&%s`& has been resurrected by `\$Ramius`&.",$session['user']['name']);
        $session['user']['resurrections']++;
        output("`n`n`@You are resurrected!  This is resurrection number %s.`n",$session['user']['resurrections']);
        $session['user']['alive']=true;
        $spirits=-6;
        $session['user']['turns']+=$spirits;
        $session['user']['spirits'] = $spirits;
        invalidatedatacache("list.php-warsonline");
        $session['user']['deathpower']-=100;
        $session['user']['restorepage']="village.php";
        //clear all standard buffs
        $tempbuf = unserialize($session['user']['bufflist']);
        $session['user']['bufflist']="";
        strip_all_buffs();
        tlschema("buffs");
        while(list($key,$val)=@each($tempbuf)){
                if ($val['survivenewday']==1){
                        //$session['bufflist'][$key]=$val;
                        if ($val['schema']) tlschema($val['schema']);
                        apply_buff($key,$val);
                        output($val['newdaymessage']);
                        output_notl("`n");
                        if ($val['schema']) tlschema();
                }
        }
        tlschema();
        if ($session['user']['hashorse']){
                $buff = unserialize($playermount['mountbuff']);
                if ($buff['schema'] == "") $buff['schema']="mounts";
                apply_buff('mount',$buff);
        }
        addnav("Continue","village.php");
« Last Edit: October 02, 2004, 12:27:15 PM by Tholgare » Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #2 on: October 02, 2004, 12:34:11 PM »

No, what you found there was the code which preserved buffs which were supposed to preserve across newday (such as the transmutation sickness).

The racial buffs are handled on the newday hook.

Might I strongly strongly suggest that you are going about this the wrong way and that rather than trying to move all of the code into the graveyard, you look at the various code in newday, realize that newday knows whether it's a resurrection or not and code accordingly rather than making an absolute hash of it Smiley

You could even *gasp* add some game settings or what not and then check if that game setting is true/false and if it's a resurrection before allowing/denying the thing to occur.  Or, you could just realize that we gave a fair amount of thought to what resurrection meant in game terms and put it the way we did for a reason and that it was actually relatively well balanced (unless you have an obscenely high number of turns per day which we consider unbalanced anyway).
Logged

Ex co-developer of LotGD
Tholgare
Guest
« Reply #3 on: October 02, 2004, 12:52:24 PM »

oh sure, you just gotta go and smack me upside the head with logical thought and right anwers, huh?

 Wink

Seriously though, now that you mention it (and I think about it a bit more) I realize that I did go about it all wrong.  You also made me realize that before I succumbed to a couple complaints from a couple players and my own uncertainty about how things did/should work, I and my players probably should have played more.  Three weeks into it probably wasn't the best time to decide to change what someone else has spent months/years working on.  So yeah, thanks for the advice, I'm changing it back to the way it was.   Smiley
Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #4 on: October 02, 2004, 06:39:35 PM »

* Kendaer grins.

It's a truism that there are two types of players out there.

There are the players who enjoy the challenge, and then there are the players who will try and get you to make everything easier for them and who believe that more is always always better.  Sometimes, that's not true Smiley  unfortunately, having this attitude also leads to people claiming that Eric and I have bugs up our butts about gemshops Smiley [well we do sorta but that's because we don't see gems as something to be traded but something that should be worked HARD to aquire, not gotten trivially]
Logged

Ex co-developer of LotGD
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
38 Guests, 3 Users
windsummoner, Leskana, Iori
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search