condition.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:3k
- // Condition.cpp: implementation of the CCondition class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "Condition.h"
- #include "ActiveObject.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CCondition::CCondition()
- {
- nKind = 0;
- szName = "";
- nTime = 0;
- nPower = 0;
- }
- CCondition::~CCondition()
- {
- }
- int CCondition::UpdataPoison(CActiveObject * lpMan)
- {
- if(szName == "wine")
- return UpdataDrink(this,lpMan);
- if(szName == "ice")
- return UpdataIce(this,lpMan);
- if(szName == "Yihan")
- return UpdataYihan(this,lpMan);
- if(szName == "Duanchanghua")
- return UpdataDuanchanghua(this,lpMan);
- if(szName == "Rose")
- return UpdataRose(this,lpMan);
- if(szName == "Sleepdrug")
- return UpdataSleepdurg(this,lpMan);
- if(szName == "Snake")
- return UpdataSnake(this,lpMan);
- if(szName == "Shengshifu")
- return UpdataShengshifu(this,lpMan);
- if(szName == "Xingxiustrike")
- return UpdataXingxiustrike(this,lpMan);
- if(szName == "Freezeblood")
- return UpdataFreezeblood(this,lpMan);
- if(szName == "Bandaged")
- return UpdataBandaged(this,lpMan);
- return 0;
- }
- int UpdataDrink(CCondition * lpCondition, CActiveObject * lpMan)
- {
- int nlimit;
- nlimit = lpMan->nCon * 2 + lpMan->nMax_force / 20;
- //if( lpCondition->nTime > nlimit && living(me) )
- {
- lpMan->Unconcious();
- return 0;
- }
- /* else if( !living(me) )
- {
- message("vision", me->name() + "ゴ