Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent land adjacencies with fire danger #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions landlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,19 @@ EX int isRandland(eLand l) {
return 0;
}

EX bool landStartsFires(eLand l) {
return (l == laPower || l == laVolcano || l == laDragon || l == laEFire || l == laRlyeh);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in comments:

Suggested change
return (l == laPower || l == laVolcano || l == laDragon || l == laEFire || l == laRlyeh);
return (l == laPower || l == laVolcano || l == laDryForest || l == laDragon || l == laEFire || l == laRlyeh);

}

EX bool landCatchesFire(eLand l) {
return (l == laWineyard || l == laDryForest || l == laEndorian || l == laRose);
}

EX bool incompatible1(eLand l1, eLand l2) {
if(isCrossroads(l1) && isCrossroads(l2)) return true;
if(landStartsFires(l1) && landCatchesFire(l2)) return true;
if(l1 == laJungle && l2 == laMotion) return true;
if(l1 == laMirrorOld && l2 == laMotion) return true;
if(l1 == laPower && l2 == laWineyard) return true;
if(l1 == laPower && l2 == laDryForest) return true;
if(l1 == laVolcano && l2 == laDryForest) return true;
if(l1 == laVolcano && l2 == laWineyard) return true;
if(l1 == laDragon && l2 == laDryForest) return true;
if(l1 == laEFire && l2 == laWineyard) return true;
if(l1 == laEFire && l2 == laDryForest) return true;
if(l1 == laGraveyard && l2 == laDryForest) return true;
if(l1 == laGraveyard && l2 == laDice) return true;
if(l1 == laGraveyard && l2 == laRuins) return true;
Expand Down