liquid_feedback_frontend
diff model/battle.lua @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
author | bsw |
---|---|
date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/model/battle.lua Thu Jul 10 01:19:48 2014 +0200 1.3 @@ -0,0 +1,10 @@ 1.4 +Battle = mondelefant.new_class() 1.5 +Battle.table = 'battle' 1.6 + 1.7 +function Battle:getByInitiativeIds(winning_id, losing_id) 1.8 + local selector = Battle:new_selector() 1.9 + selector:add_where { "winning_initiative_id = ?", winning_id } 1.10 + selector:add_where { "losing_initiative_id = ?", losing_id } 1.11 + selector:optional_object_mode() 1.12 + return selector:exec() 1.13 +end