Skip to content

Instantly share code, notes, and snippets.

@zulman
Created August 14, 2012 07:19
Show Gist options
  • Save zulman/3347152 to your computer and use it in GitHub Desktop.
Save zulman/3347152 to your computer and use it in GitHub Desktop.
ConditionHelper
private static int Condition_Dialog_CastleTutorial_Conditions_m11_0( IScriptData data )
{
var Heroes = data.Heroes;
var Buildings = data.Buildings;
var Lord = data.Lord;
int result = 0;
foreach(var building in Buildings)
{
if(building.PersistentId=="Production_Resource2")
{
result+=1;
};
};
return result;
}
private static int Condition_Dialog_CastleTutorial_Conditions_m11_1( IScriptData data )
{
var Heroes = data.Heroes;
var Buildings = data.Buildings;
var Lord = data.Lord;
int result = 0;
return Lord.Resources.Resource2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment