mud/lib/lib/potion.c
2020-09-06 05:43:07 -07:00

70 lines
1.1 KiB
C

#include <lib.h>
inherit LIB_MEAL;
mapping Skills = ([]);
mapping Stats = ([]);
mapping Points = ([]);
int Duration;
void create(){
meal::create();
}
mapping SetStats(mapping arg){
Stats = copy(arg);
return copy(Stats);
}
mapping GetStats(){
return copy(Stats);
}
mapping SetSkills(mapping arg){
Skills = copy(arg);
return copy(Skills);
}
mapping GetSkills(){
return copy(Skills);
}
mapping SetPoints(mapping arg){
Points = copy(arg);
return copy(Points);
}
mapping GetPoints(){
return copy(Points);
}
int SetDuration(int i){
Duration = i;
return Duration;
}
int GetDuration(){
return Duration;
}
mixed eventDrink(object who){
object ob=new(LIB_BONUS);
ob->SetPoints(Points);
ob->SetStats(Stats);
ob->SetSkills(Skills);
ob->SetBonusDuration(Duration);
ob->eventMove(who);
return meal::eventDrink(who);
}
mixed eventEat(object who){
object ob=new(LIB_BONUS);
ob->SetPoints(Points);
ob->SetStats(Stats);
ob->SetSkills(Skills);
ob->SetBonusDuration(Duration);
ob->eventMove(who);
return meal::eventEat(who);
}